help debugging stdin in Komodo, IDLE, or PythonWin

P

Pete Jereb

I am really stuck here. I would love to use an IDE to debug my
programs, but they are all set to accept input from stdin, ie

python rdip.py < scriptfile.txt


I can't figure out how to do this in PythonWin, IDLE, or Komodo.
Help! I've been poring through manuals and google for hours trying to
figure this out.
 
N

Nick Vargish

I am really stuck here. I would love to use an IDE to debug my
programs, but they are all set to accept input from stdin, ie
python rdip.py < scriptfile.txt

Okay, this doesn't actually solve your problem, but it's a
work-around.

sys.stdin = file('scriptfile.txt', 'r')

Comment that line out when you aren't running under the IDE. It's a
cheap hack, but at least you only need to add one line...

Nick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top