A few beginning questions

Thomas Heller theller at python.net
Fri Jul 18 16:56:17 CEST 2003

>>> optparse (a.k.a. optik) is great, whereas I never made my mind up to
>>> getopt. To "cure" getopt, I needed to define my own routines for
>>> argument parsing; after I started using optparse I had the satisfaction
>>> of erasing all of them ;)
>> I have not yet tried optparse. Is it able to parse Windows' style
>> command lines (use '/' instead of '-', ignore case of command line
>> options, use long options with a single '-' or '/')?
>> Thomas
> No. From the optparse documentation:

> Is Windows-style arguments (with slashes) *that* important to you?
> Because there's absolutely nothing wrong with following the standard
> that's been established for over twenty years... :-)

You (or me, at least) have to follow the standard that is used on the
system where you work on. Well, sometimes at least.

Example: a localserver COM object is started with an /Automate command
line flag. And MS requires that the COM object registers itself when the
/RegServer or -regserver (case insensitive) options are used.

Anyway, I have my own w_getopt for windows now ;-)


More information about the Python-list mailing list