skip to navigation
skip to content

Python Wiki

Python Insider Blog

Python 2 or 3?

Help Fund Python

[Python resources in languages other than English]

Non-English Resources

Add an event to this calendar.

Times are shown in UTC/GMT.

Add an event to this calendar.

Python Getopt SIG

The purpose of this SIG was to come up with a new and improved library for command-line parsing in Python 2.3. Everybody seems to agree that the venerable getopt module just doesn't do enough. The trick is to find something that is sufficiently powerful and flexible without being too complex to use, especially for novice programmers.

The SIG was kicked off shortly after David Goodger and Greg Ward (your humble narrator and champion of this SIG) independently proposed adding Optik to the standard library. This kicked off a brief thread on python-dev, the outcome of which is that Paul Prescod posted a request for comments to get input from the wider community. Several people chimed in with their opinions, and Guido told us to go off and figure out a solution, then report back to python-dev.

Comparing some libraries

I decided the only fair way to compare various libraries is to implement the same command-line interface with several of them. Here are the results of that experiment.

Optik, renamed to optparse, was added to Python 2.3's standard library.