skip to navigation
skip to content

getargs 2.0

A more powerful and flexible alternative to the standard getopt module

getargs is a Python module that implements a command line parser that Python scripts can use to parse their command line arguments in sys.argv. It is designed as a considerably more powerful and flexible alternative to the standard getopt module. While supporting all features provided by getopt, it also allows a command line option to take an arbitrary number of arguments and have defaults, permits switches (options without arguments) and options with arguments to be interleaved on the command line, allows the developer to specify the maximum and minimum number of arguments an option can take and allows the user to specify his oft-used options and arguments in a file.