Message145764
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. |
|
Date |
User |
Action |
Args |
2011-10-17 22:30:04 | bpoaugust | set | recipients:
+ bpoaugust, vstinner, ned.deily, eric.araujo, r.david.murray, brian.curtin, jldm |
2011-10-17 22:30:04 | bpoaugust | set | messageid: <1318890604.47.0.432666191633.issue10197@psf.upfronthosting.co.za> |
2011-10-17 22:30:03 | bpoaugust | link | issue10197 messages |
2011-10-17 22:30:03 | bpoaugust | create | |
|