[Python-Dev] RE: RFC: Option Parsing Libraries

Greg Ward gward at python.net
Mon Feb 11 14:40:12 EST 2002


On 11 February 2002, Gerson Kurz said:
> I will get beat for this, but: can it be optionally non-case-sensitive? I
> know, I know, in time-honoured unix-tradition a commandline should be
> dangerous and unforgiving in use, but still, please?

Interesting idea; should be trivial given a case-insensitive dictionary.
And hasn't such a beast been bandied about as an example of subclassing
built-in types with Python 2.2?

Anyways, that's an Optik feature requests, and belongs on
optik-users at lists.sourceforge.net.  If you're serious, take it up there.

> Also, I've just scanned the specs and didn't find some
> "rest-of-the-commandline-whatever-that-is" option. As in:
> 
> filename options file1 file2 ... filen

When you do this:

  parser = OptionParser(...)
  (options, args) = parser.parse_args()

then args is the list of positional arguments left over after parsing
options.

But again, that's a question about Optik, and belongs (for now) on the
optik-users list.

        Greg
-- 
Greg Ward - just another Python hacker                  gward at python.net
http://starship.python.net/~gward/
Paranoia is simply an optimistic outlook on life.




More information about the Python-list mailing list