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 ac.james
Recipients ac.james
Date 2009-05-26.00:45:51
SpamBayes Score 4.6954707e-09
Marked as misclassified No
Message-id <1243298755.35.0.185322237377.issue6107@psf.upfronthosting.co.za>
In-reply-to
Content
When calling p=subprocess.Popen(findstr "string" filename, stdout=PIPE)
both p.stdout.read() and p.communicate()[0] are returning None even when
the shell process has output (ie string was found in filename).  
Further, redirecting stdout to a file will write an empty file.  

I've got this result from running in script and on IDLE command line
with Python 2.6.2 on windows Vista home premuim and windows XP SP2
systems.  

Thinking this may be related to issue 1707753 or 1124861 I tried the
putting all streams to pipes workaround, but that also failed here.  

Using subprocess.call with stdout to file did work.  

This issue is primarily about the lack of cross-platform compatability
that the subprocess module was supposed to have, on unix systems the
base program I'm working with can call grep from any of os.popen,
popen2, or subprocess.Popen and work just fine.
History
Date User Action Args
2009-05-26 00:45:55ac.jamessetrecipients: + ac.james
2009-05-26 00:45:55ac.jamessetmessageid: <1243298755.35.0.185322237377.issue6107@psf.upfronthosting.co.za>
2009-05-26 00:45:53ac.jameslinkissue6107 messages
2009-05-26 00:45:52ac.jamescreate