unexpected os.system behavior on windows NT

jepler at unpythonic.net jepler at unpythonic.net
Wed May 8 20:39:26 EDT 2002


On Wed, May 08, 2002 at 09:34:41PM +0200, Thomas Heller wrote:
> > os.system seems to malfunction when the command name and another
> > argument are both quoted on the commandline.  All these commands
> > run "as expected" when executed directly in a command window.
> 
> I've posted this before... There are strange rules of cmd.exe regarding
> quotes, but 'cmd /?' on Win2k finally documents them.

Thanks .. this is something that's always frustrated/puzzled me.  I think
there are two pieces missing still, which must be documented somewhere
    -- how does an exec* argument list get turned into a command line?
    -- how does the target program parse that back into an argc/argv list?

I started to get the results I expected as soon as I used an 8.3 name for
the executable and quoted any argument with whitespace (not handling any
more esoteric characters properly), but I hear that some versions of
windows disable 8.3 compatability names.  I don't know how I'd refer to
"C:\Program Files\Software Company\Product Name\Nose Monkeys.exe"
without them, though..

I wish somebody I worked with Really Understood (TM) NT.

Jeff





More information about the Python-list mailing list