February 2006
Intermediate to advanced
648 pages
14h 53m
English
The optparse module provides high-level support for processing command-line options. It provides similar functionality as the getopt module, but adds a considerable number of new features related to configuration, error handling, and option processing. Use of optparse primarily focuses on the OptionParser class.
OptionParser([**args])Creates a new command option parser and returns an OptionParser instance. A variety of optional keyword arguments can be supplied to control configuration. These keyword arguments are described in the following list:
| Keyword Argument | Description |
|---|---|
| add_help_option | Specifies whether or not a special help option (--help and -h) is supported. By default, this is set to True. |
| conflict_handler | Specifies the handling ... |
Read now
Unlock full access