Alex James <ac.ja...@shaw.ca> added the comment:

>>> import subprocess
>>> fileName = 'test_a5.py.out'
>>> locator = 'step 5200 '
>>> p = subprocess.Popen('findstr /O /B /C:"' + locator + '" '+
fileName, stdout=subprocess.PIPE, shell=True)
>>> print p.stdout.read()

>>> print p.communicate()[0]

And stderr is also returning None when similarly referenced.  I'm using
relative file paths since the script and data files are all kept in the
same directory, and to avoid escaping backslashes.  
When the same (composited) line is typed into cmd.exe it returns properly
223473:step 5200 potentialEnergySum -2643.62601773

----------

_______________________________________
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