Eryk Sun <eryk...@gmail.com> added the comment:

`cmd.exe dir` ignores the unrecognized `dir` argument and runs the interactive 
shell. The shell is waiting for input on stdin. You can type "exit" and press 
enter to return to Python.  

When you run this from IDLE (i.e. via pythonw.exe), there's no StandardInput 
handle to inherit, so subprocess executes cmd.exe with its stdin set to a 
closed pipe. (I don't know why a closed pipe is used. I think "NUL" would be 
better.) The shell exits immediately because ReadFile fails with 
ERROR_BROKEN_PIPE.

----------
nosy: +eryksun
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

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

Reply via email to