Table of Contents

Module: optparse ./src/peak/util/optparse.py

optparse - a powerful, extensible, and easy-to-use option parser.

By Greg Ward <[email protected]>

Originally distributed as Optik; see http://optik.sourceforge.net/ .

If you have problems with this module, please do not file bugs, patches, or feature requests with Python; instead, use Optik's SourceForge project page: http://sourceforge.net/projects/optik

For support, use the [email protected] mailing list (http://lists.sourceforge.net/lists/listinfo/optik-users).

Imported modules   
from gettext import gettext
import os
import sys
import textwrap
import types
Functions   
_match_abbrev
_repr
check_builtin
check_choice
  _match_abbrev 
_match_abbrev ( s,  wordmap )

_match_abbrev(s : string, wordmap : {string : Option}) -> string

Return the string key in wordmap for which s is an unambiguous abbreviation. If s is found to be ambiguous or doesn't match any of words, raise BadOptionError.

Exceptions   
BadOptionError( _( "no such option: %s" ) % s )
BadOptionError(_( "ambiguous option: %s (%s?)" ) %(s, ", ".join( possibilities ) ) )
  _repr 
_repr ( self )

  check_builtin 
check_builtin (
        option,
        opt,
        value,
        )

Exceptions   
OptionValueError(_( "option %s: invalid %s value: %r" ) %( opt, what, value ) )
  check_choice 
check_choice (
        option,
        opt,
        value,
        )

Exceptions   
OptionValueError(_( "option %s: invalid choice: %r (choose from %s)" ) %( opt, value, choices ) )
Classes   

BadOptionError

Raised if an invalid or ambiguous option is seen on the command-line.

HelpFormatter

Abstract base class for formatting option help. OptionParser

IndentedHelpFormatter

Format help with indented section bodies.

OptParseError

Option

Instance attributes:

OptionConflictError

Raised if conflicting options are added to an OptionParser.

OptionContainer

Abstract base class.

OptionError

Raised if an Option instance is created with invalid or

OptionGroup

OptionParser

Class attributes:

OptionValueError

Raised if an invalid option value is encountered on the command

TitledHelpFormatter

Format help with underlined section headers.

Values


Table of Contents

This document was automatically generated on Mon Nov 11 01:11:04 2024 by HappyDoc version 2.1