Tim Golden <m...@timgolden.me.uk> added the comment:

Erik Sandberg wrote:
> Erik Sandberg <sandb...@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"])

----------
nosy: +tim.golden

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5484>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to