[issue1524] os.system() fails for commands with multiple quoted file names
Sean Reifschneider
report at bugs.python.org
Thu Mar 20 18:53:46 CET 2008
Sean Reifschneider <jafo at tummy.com> added the comment:
I would agree with Georg that there isn't anything we can do about this.
I had someone try from the Windows XP command shell and: "dir" "/w"
reports that it can't run the combined command, where: dir /w works just
fine.
My conclusions are:
This is a bug in the Windows shell (which os.system hands the command to).
There is a work-around using "call" as pointed out by Jean-François
The subprocess module is a better match for this, as you pass a tuple to
make quoting unnecessary.
According to the os module documentation, using subprocess is
recommended in preference to using os.system().
----------
nosy: +jafo
priority: -> normal
resolution: -> wont fix
status: open -> closed
type: crash -> behavior
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1524>
__________________________________
More information about the Python-bugs-list
mailing list