[issue5484] subprocess.call() fails for .bat files on Windows, if executable path contains parenthesis
Erik Sandberg
report at bugs.python.org
Fri Mar 13 15:32:07 CET 2009
New submission from Erik Sandberg <sandberg at virtutech.com>:
When subprocess.call is told to execute a .bat file on Windows, and the
path to the batch file is given as an absolute path, and the path
includes a left parenthesis ('('), then the call fails with a message
similar to the following; it appears that the parenthesis is incorrectly
quoted.
'c:\tmp\f' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File "parenbug.py", line 7, in <module>
subprocess.check_call(os.path.join(os.getcwd(), bat))
File "c:\Python25\lib\subprocess.py", line 461, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'c:\tmp\f(o.bat' returned
non-zero exit status 1
I have reproduced this on Windows XP.
----------
components: Library (Lib), Windows
files: parenbug.py
messages: 83518
nosy: sandberg
severity: normal
status: open
title: subprocess.call() fails for .bat files on Windows, if executable path contains parenthesis
type: behavior
versions: Python 2.5
Added file: http://bugs.python.org/file13319/parenbug.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5484>
_______________________________________
More information about the Python-bugs-list
mailing list