help debugging stdin in Komodo, IDLE, or PythonWin

Nick Vargish nav+posts at bandersnatch.org
Thu Oct 2 15:08:04 EDT 2003


petejereb at yahoo.com (Pete Jereb) writes:

> 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

-- 
#  sigmask  ||  0.2  ||  20030107  ||  public domain  ||  feed this to a python
print reduce(lambda x,y:x+chr(ord(y)-1),' Ojdl!Wbshjti!=obwAcboefstobudi/psh?')




More information about the Python-list mailing list