Optik (aka optparse)

Introduction

Optik is a powerful, flexible, extensible, easy-to-use command-line
parsing library for Python. Using Optik, you can add intelligent,
sophisticated handling of command-line options to your scripts with very
little overhead. (And, since Python 2.3, Optik is now part of the
Python standard library, under the name optparse.)

Here's an example of using Optik to add some command-line options to a
simple script:

That's just a taste of the flexibility Optik gives you in parsing your
command-line. See the documentation included in the package for
details.

Requirements

Optik 1.5.1 requires Python 2.0 or greater (although I only tested it
with 2.1 through 2.5a1).

As of Python 2.3, Optik is part of the standard library -- although
it's now called optparse. For forwards compatibility with
Python 2.3, the standalone Optik distribution also installs a module
called optparse (Optik 1.4.1 or later).

Installation

Installation is easy; just use the standard incantion for installing
Python modules:

python setup.py install

If you're using Python 2.3 or later and don't need the new features in
Optik 1.5, you don't need to install anything: just import from
optparse in the standard library.