Under some conditions stdin, stdout and stderr as well as the original values stdin, stdout and stderr can be None. It is usually the case for Windows GUI apps that aren’t connected to a console and Python apps started with pythonw.
- Why would a standard stream be set to
None
? - What are the consequences of standard in/out being
None
? - Where is the relevant code or docs explaining these consequences?