Author eryksun
Recipients eryksun, sanjay patel
Date 2018-07-26.11:30:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1532604601.0.0.56676864532.issue34233@psf.upfronthosting.co.za>
In-reply-to
Content
`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.
History
Date User Action Args
2018-07-26 11:30:01eryksunsetrecipients: + eryksun, sanjay patel
2018-07-26 11:30:01eryksunsetmessageid: <1532604601.0.0.56676864532.issue34233@psf.upfronthosting.co.za>
2018-07-26 11:30:00eryksunlinkissue34233 messages
2018-07-26 11:30:00eryksuncreate