New submission from Alex James <ac.ja...@shaw.ca>:

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.

----------
title: Pipes fail to return subprocess output on Windows -> Subprocess.Popen 
output fails on Windows

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6107>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to