This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.golden
Recipients sandberg, tim.golden
Date 2009-03-13.18:29:37
SpamBayes Score 0.0002544714
Marked as misclassified No
Message-id <49BAA60C.6070103@timgolden.me.uk>
In-reply-to <1236967950.93.0.476722591158.issue5484@psf.upfronthosting.co.za>
Content
Erik Sandberg wrote:
> Erik Sandberg <sandberg@virtutech.com> added the comment:
> 
> I experimented further, the only way to run a .bat file whose name
> contains funny characters, seems to be:
> 
> subprocess.call('""f(o.bat""', shell=True)

Well there's a bit of a double-whammy going on here. There's
a long-unfixed bug which doesn't quote parameters to
subprocess under Windows when shell=True:

  http://bugs.python.org/issue2304

but in fact you don't need to set shell=True to run a batch
file anyway:

import subprocess
open ("t(o.bat", "w").write ("echo we are here\n")
subprocess.call (["t(o.bat"])
History
Date User Action Args
2009-03-13 18:29:41tim.goldensetrecipients: + tim.golden, sandberg
2009-03-13 18:29:38tim.goldenlinkissue5484 messages
2009-03-13 18:29:37tim.goldencreate