You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows, the pythonw interpreter sets sys.stdout and sys.stderr to None.
This is because Windows itself does not set up a default stdio streams when starting an app from the GUI.
Which, of course, is why the redirect flag exists.
But if you don't redirect, then you get broken stdio streams.
This is a problem, because third party libraries may well write to the standard streams -- as it's a reasonable assumption that they be there and be valid, and then you get a crash.
There's discussion about whether pythonw should set them to None:
On Windows, the
pythonw
interpreter setssys.stdout
andsys.stderr
to None.This is because Windows itself does not set up a default stdio streams when starting an app from the GUI.
Which, of course, is why the
redirect
flag exists.But if you don't redirect, then you get broken stdio streams.
This is a problem, because third party libraries may well write to the standard streams -- as it's a reasonable assumption that they be there and be valid, and then you get a crash.
There's discussion about whether pythonw should set them to None:
python/cpython#122633
But for now, and for the foreseeable future, it will be that way, so it would be great if wxPython had something like:
in the App startup code.
Users, could, of course, redirect them any other way that want.
The text was updated successfully, but these errors were encountered: