This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients Thekent, ned.deily, terry.reedy
Date 2011-04-16.06:17:15
SpamBayes Score 8.204548e-14
Marked as misclassified No
Message-id <1302934636.68.0.870845495219.issue11820@psf.upfronthosting.co.za>
In-reply-to
Content
I agree that it is kind of odd behavior and, after a quick look back through open issues, I was a bit surprised to not find an open issue about it (although I may have overlooked one).

"Thus it does not seem to be an os.system issue, but a failure of Idle to capture the sysoutput string as the interpreter does  The xterminal example highlights this.  The sysoutput is echoed at the xterminal not in idle."

The reason this is an issue is because the interpreter does *not* do anything special to capture stdout from subprocesses.  If you're running the interpreter in a terminal window both stdout from the interpreter process and, by default, stdout from any child processes, like those created by os.system or subprocess (if you don't override it), inherit the same stdout and so the output from both processes show up in the same place (i.e. terminal session) automatically.  When running under IDLE though, IDLE uses its own proxy output object to intercept the output from the interpreter but does not do anything special for stdout from subprocesses so that output ends up in unexpected places: the terminal session from which IDLE was launched or the transient window on Windows or into the system log with the OS X IDLE.app.  I think IDLE could do a better job of intercepting stdout for these cases but it might be a bit tricky to make it work across all platforms.
History
Date User Action Args
2011-04-16 06:17:16ned.deilysetrecipients: + ned.deily, terry.reedy, Thekent
2011-04-16 06:17:16ned.deilysetmessageid: <1302934636.68.0.870845495219.issue11820@psf.upfronthosting.co.za>
2011-04-16 06:17:16ned.deilylinkissue11820 messages
2011-04-16 06:17:15ned.deilycreate