Author sandberg
Recipients sandberg
Date 2009-03-13.14:32:04
SpamBayes Score 3.7367e-06
Marked as misclassified No
Message-id <1236954727.06.0.0825252452212.issue5484@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-03-13 14:32:07sandbergsetrecipients: + sandberg
2009-03-13 14:32:07sandbergsetmessageid: <1236954727.06.0.0825252452212.issue5484@psf.upfronthosting.co.za>
2009-03-13 14:32:05sandberglinkissue5484 messages
2009-03-13 14:32:04sandbergcreate