pythonw freezes with print output

Thomas Heller theller at python.net
Wed Jul 9 13:55:42 CEST 2003


Thomas Kwapich <evotrain at gmx.net> writes:

> Hi,
>
> I'm developing a wxpython application under windows 2000. 
> If I start it with pythonw.exe (without dos window) it freezes 
> after some time depending on the amount of print output it generates. 
> On the other hand if I start it with python.exe (the dos window is shown) 
> it is stable.
> Reducing the print output to zero makes it even stable when started with 
> pythonw.
>
> (I tried to debug it with SciTe but it doesn't crash with it altough 
> SciTe starts it with pythonw)
>
> Any ideas why this happens?

It is my experience (with Win2k and XP, and Python 2.2 at least) that
you get an IOError after writing 4096 bytes (or so) to sys.stdout.

You should probably redirect sys.stdout and sys.stderr to a file, or a
file-like object, otherwise you won't see any output or any tracebacks.

(It may work in SciTe because SciTe catches the output of the program itself?)

Thomas




More information about the Python-list mailing list