Message161720
I disagree. I think you are confusing Python's sys.std* objects with the std* file descriptors of a process. The important points here are that IDLE is effectively substituting its rpcproxy for the std* file descriptors of the IDLE shell process that it creates *and* that, in POSIX world, a forked subprocess is required to inherit copies of the file descriptors (in particular, sys.std*) of its parent (the IDLE shell subprocess). So, if the IDLE shell subprocess displays the output written to the stdout and stderr in the Python Shell window and directs typed-in input from that window to the stdin file descriptor, it is reasonable to assume that the same thing should happen by default to processes launched within that IDLE shell subprocess, be they by os.system or by subprocess.Popen. subprocess.Popen lets you substitute sys* file associations when creating the subprocess but that is irrelevant for the default case. The default for subprocess.Popen is exactly the same as os.system: "With the default settings of None, no redirection will occur; the child’s file handles will be inherited from the parent." |
|
Date |
User |
Action |
Args |
2012-05-27 20:12:17 | ned.deily | set | recipients:
+ ned.deily, terry.reedy, Thekent |
2012-05-27 20:12:17 | ned.deily | set | messageid: <1338149537.51.0.054679999783.issue11820@psf.upfronthosting.co.za> |
2012-05-27 20:12:16 | ned.deily | link | issue11820 messages |
2012-05-27 20:12:16 | ned.deily | create | |
|