--- Lib/subprocess.py +++ Lib/subprocess.py @@ -610,7 +610,10 @@ >>> subprocess.getstatusoutput('/bin/junk') (256, 'sh: /bin/junk: not found') """ - pipe = os.popen('{ ' + cmd + '; } 2>&1', 'r') + if mswindows: + pipe = os.popen('( ' + cmd + ' ) 2>&1', 'r') + else: + pipe = os.popen('{ ' + cmd + '; } 2>&1', 'r') text = pipe.read() sts = pipe.close() if sts is None: sts = 0