A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-February/019967.html below:

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

[Python-Dev] Re: RFC: Option Parsing Libraries [Python-Dev] Re: RFC: Option Parsing LibrariesBen Wolfson wolfson@uchicago.edu
Mon, 11 Feb 2002 17:31:49 -0600
I have an option-parsing module at
http://home.uchicago.edu/~wolfson/Python/arglist.py ; from reading
Optik's docs it isn't as featureful but it does answer the list given in 
http://mail.python.org/pipermail/python-dev/2002-February/019937.html.
I haven't used Optik, but my module seems simpler to use.  It supports
arbitrary callbacks, can be strongly typed (insofar as passing, eg the
int function as a callback will generate an error if the value isn't
int-able), recognizes the identity of short and long forms, and has a
reasonable range of actions--if an option has no argument, by default it
records if it appeared and how often; if it does, it can append multiple
occurences to a list or keep only the last.  Callbacks aren't as flexible
as Optik's (they are functions of one argument) but with nested scopes
that probably wouldn't be terribly problematic.

I'm currently in the process of re-writing arglist.py in my spare time
since the code is rather messy, so if it's seen as a contender I could
add features.

-- 
BTR    
BEN WOLFSON HAS RUINED ROCK MUSIC FOR A GENERATION
 -- Crgre Jvyyneq



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4