len(sys.argv) in (3,4)

infidel saint.infidel at gmail.com
Fri Aug 12 10:21:31 EDT 2005


> Nope. But since you're running this on a very peculiar OS, I just can
> guess that this very peculiar OS consider all args to be one same string...

It depends on what you're coding with.  If you're writing a Win32
program in C/C++ (and by extension, Visual Basic), the WinMain()
function passes all of the arguments in a single string.  One of the
many stunningly boneheaded Win32 decisions, IMNSHO.

> BTW, isn't the DOS syntax for command line args something like :
> > myprog /arg1 /arg2

No, by convention only, the "switch" character for DOS programs is "/"
instead of "-" or "--".  Personally, I'm of the opinion that this
switch convention, backslashes in paths, and two-byte newlines are all
intentionally designed to make things LESS compatibile with other OSes,
and MORE difficult to interoperate.




More information about the Python-list mailing list