bpoaugust <[email protected]> added the comment:
A better fix, which supports multiple windows commands:
if mswindows:
pipe = os.popen('( ' + cmd + ' ) 2>&1', 'r') # Windows uses () rather
than { }
else:
pipe = os.popen('{ ' + cmd + '; } 2>&1', 'r')
This works with the command
subprocess.getoutput("echo before & python -V & echo after")
Note that python -V writes to stderr, so without the enclosing ( ) the version
information is not captured.
----------
Added file: http://bugs.python.org/file23433/subprocess.patch
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue10197>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com