Message83526
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"]) |
|
Date |
User |
Action |
Args |
2009-03-13 18:29:41 | tim.golden | set | recipients:
+ tim.golden, sandberg |
2009-03-13 18:29:38 | tim.golden | link | issue5484 messages |
2009-03-13 18:29:37 | tim.golden | create | |
|