How to read stdin while debuggingin PythonWin

Guido van Rossum guido at eric.cnri.reston.va.us
Fri Apr 30 23:27:35 EDT 1999


cmedcoff at my-dejanews.com writes:

> > Im not sure why this would be different under the debugger, but when I try
> > that from the Pythonwin window I get:
> > >>> sys.stdin.read()
> > Traceback (innermost last):
> >   File "<interactive input>", line 0, in ?
> > IOError: [Errno 9] Bad file descriptor

> This is exectly what I observed when aborting the debug process.
> Any plans to correct this and provide a place for stdin under the
> debugger.

Mark may not have such plans for PythonWin, but IDLE does fully
support sys.stdin, whether or not in the IDLE debugger, in a way very
similar to using the command line python.exe.

At the moment, IDLE's debugger is not as smooth as Mark's, but it's
got your basic step and view locals/globals/source functionality.
Breakpoints seem to be broken on Windows (something to do with
pathname syntax I'm sure).

(IDLE is a new Python program development environment; IDLE 0.4 comes
with Python 1.5.2.  It requires Tcl/Tk, which (on Windows) also comes
with Python 1.5.2.)

--Guido van Rossum (home page: http://www.python.org/~guido/)




More information about the Python-list mailing list