unexpected os.system behavior on windows NT

Gabe Newcomb Gabe.Newcomb at noetix.com
Wed May 8 20:45:15 EDT 2002


For questions regarding command line stuff on Windows, check out
www.technet.com. I get really irritated because cmd.exe has very little
documentation, but I've been able to find a lot at this site. Good luck!

Gabe

-----Original Message-----
From: jepler at unpythonic.net [mailto:jepler at unpythonic.net]
Sent: Wednesday, May 08, 2002 5:39 PM
To: Thomas Heller
Cc: python-list at python.org
Subject: Re: unexpected os.system behavior on windows NT


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


-- 
http://mail.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list