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 Thekent
Recipients Thekent, terry.reedy
Date 2011-04-16.01:52:28
SpamBayes Score 1.47517e-11
Marked as misclassified No
Message-id <1302918749.54.0.847104259546.issue11820@psf.upfronthosting.co.za>
In-reply-to
Content
I tried using subprocess.Popen and subprocess.call, both of which did the same behavior. Under the interpreter I get the desired string output:
>>> subprocess.call('ls')
bin      Documents  eclipse  local  Pictures   tmp     workspace
Desktop  Downloads  hamlib   Music  Templates  Videos
0

Under Idle:

>>> subprocess.call('ls')
0
Thus the subprocess.call method provides the string output.  Why should I have to use the subprocess.check_output('command').decode() when subprocess.call() gives me what I want?

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.

You are correct there are other ways to get the specific information for ls.  I was using that as test command.  I was experimenting with the commands in order to a write a program which will run an executable under either windows or linux.  I wanted to see the output in the interpreter in order to test it.  I was using Idle for the testing.  It does NOT work the same as the interpreter.  If Idle is to be useful as an IDE, shouldn't it's shell work the same as the interpreter? If it doesn't why use Idle ?
History
Date User Action Args
2011-04-16 01:52:29Thekentsetrecipients: + Thekent, terry.reedy
2011-04-16 01:52:29Thekentsetmessageid: <1302918749.54.0.847104259546.issue11820@psf.upfronthosting.co.za>
2011-04-16 01:52:28Thekentlinkissue11820 messages
2011-04-16 01:52:28Thekentcreate