Amaury Forgeot d'Arc added the comment:

Yes, in pythonw.exe the C stderr is not really usable, and this leads to 
unpredictable results.
It's difficult to fix in python2 though; python3 has fixed this issue, but in a 
way that cannot be backported.

Some workarounds:
- don't use pythonw.exe in a console, it's meant to be a *windows* application, 
without standard streams. I'm actually surprised of the behavior of your first 
example.

- use python3, where pythonw will set sys.stderr to None, and prints will be 
silently discarded.

----------
nosy: +amaury.forgeotdarc
resolution:  -> wont fix
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18298>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to