New submission from jldm <[email protected]>:
Hi, first of all sorry for my English.
On windows XP SP3, the following code:
import subprocess
subprocess.getoutput("dir")
returns
'"{" is not recognized as an internal or external command,\noperable
program or batch file.'
I made a workaround by changing in the file Lib/subprocess.py the line 574 (I
thin in 3.2a3 is 584) (in the getstatusoutput(cmd) function definition) from:
pipe = os.popen('{ ' + cmd + '; } 2>&1', 'r')
to:
pipe = os.popen('( ' + cmd + '; ) 2>&1', 'r')
I have tested it with:
ActivePython 3.1.2.3 (ActiveState Software Inc.) based on
Python 3.1.2 (r312:79147, Mar 22 2010, 12:20:29) [MSC v.1500 32 bit (Intel)] on
win32
and
Python 3.2a3 (r32a3:85355, Oct 10 2010, 17:11:45) [MSC v.1500 32 bit (Intel)]
on win32
Regards from Spain.
José Luis Domenech
----------
messages: 119605
nosy: jldm
priority: normal
severity: normal
status: open
title: subprocess.getoutput fails on win32
type: behavior
versions: Python 3.1, Python 3.2
_______________________________________
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