This snippet defines a class OptCmd which adds line and options parsing capabilities to the python standard lib's cmd.Cmd class. It allows you to quickly write an extensible command line interpreter.
To use this module, you will need this other code snippet, saved as a module named 'argv.py'.
Enjoy the OptCmd class !