All Samples(40) | Call(0) | Derive(21) | Import(19)
Abstract base class for formatting option help. OptionParser
instances should use one of the HelpFormatter subclasses for
formatting help; by default IndentedHelpFormatter is used.
Instance attributes:
parser : OptionParser
the controlling OptionParser instance
indent_increment : int
the number of columns to indent per nesting level
max_help_position : int
the maximum starting column for option help text
help_position : int
the calculated starting column for option help text;
initially the same as the maximum
width : int
total number of columns for output (pass None to constructor for
this value to be taken from the $COLUMNS environment variable)
level : int
current indentation level
current_indent : int
current indentation level (in columns)
help_width : int
number of columns available for option help text (calculated)
default_tag : str
text to replace with each option's default value, "%default"
by default. Set to false value to disable default value expansion.
option_strings : { Option : str }
maps Option instances to the snippet of help text explaining
the syntax of that option, e.g. "-h, --help" or
"-fFILE, --file=FILE"
_short_opt_fmt : str
format string controlling how short options with values are
printed in help text. Must be either "%s%s" ("-fFILE") or
"%s %s" ("-f FILE"), because those are the two syntaxes that
Optik supports.
_long_opt_fmt : str
similar but for long options; must be either "%s %s" ("--file FILE")
or "%s=%s" ("--file=FILE").src/z/a/zamboni-lib-HEAD/lib/python/logilab/common/optik_ext.py zamboni-lib(Download)
from os.path import exists
# python >= 2.3
from optparse import OptionParser as BaseParser, Option as BaseOption, \
OptionGroup, OptionContainer, OptionValueError, OptionError, \
Values, HelpFormatter, NO_DEFAULT, SUPPRESS_HELP
class ManHelpFormatter(HelpFormatter):
"""Format help using man pages ROFF format"""
def __init__ (self,
indent_increment=0,
max_help_position=24,
width=79,
src/l/o/logilab-common-0.52.0/optik_ext.py logilab-common(Download)
from os.path import exists
# python >= 2.3
from optparse import OptionParser as BaseParser, Option as BaseOption, \
OptionGroup, OptionContainer, OptionValueError, OptionError, \
Values, HelpFormatter, NO_DEFAULT, SUPPRESS_HELP
class ManHelpFormatter(HelpFormatter):
"""Format help using man pages ROFF format"""
def __init__ (self,
indent_increment=0,
max_help_position=24,
width=79,
src/c/l/clonedigger-HEAD/trunk/clonedigger/logilab/common/optik_ext.py clonedigger(Download)
try:
# python >= 2.3
from optparse import OptionParser as BaseParser, Option as BaseOption, \
OptionGroup, OptionValueError, OptionError, Values, HelpFormatter, \
NO_DEFAULT
except ImportError:
src/c/l/clonedigger-HEAD/pretty_printing/clonedigger/logilab/common/optik_ext.py clonedigger(Download)
try:
# python >= 2.3
from optparse import OptionParser as BaseParser, Option as BaseOption, \
OptionGroup, OptionValueError, OptionError, Values, HelpFormatter, \
NO_DEFAULT
except ImportError:
src/c/l/clonedigger-HEAD/for_evalution/clonedigger/logilab/common/optik_ext.py clonedigger(Download)
try:
# python >= 2.3
from optparse import OptionParser as BaseParser, Option as BaseOption, \
OptionGroup, OptionValueError, OptionError, Values, HelpFormatter, \
NO_DEFAULT
except ImportError:
src/c/l/clonedigger-HEAD/clonedigger/logilab/common/optik_ext.py clonedigger(Download)
try:
# python >= 2.3
from optparse import OptionParser as BaseParser, Option as BaseOption, \
OptionGroup, OptionValueError, OptionError, Values, HelpFormatter, \
NO_DEFAULT
except ImportError:
src/l/o/logilab.pylintinstaller-0.15.2/logilab/common/optik_ext.py logilab.pylintinstaller(Download)
try:
# python >= 2.3
from optparse import OptionParser as BaseParser, Option as BaseOption, \
OptionGroup, OptionValueError, OptionError, Values, HelpFormatter, \
NO_DEFAULT, SUPPRESS_HELP
except ImportError:
src/c/l/clonedigger-1.1.0/clonedigger/logilab/common/optik_ext.py clonedigger(Download)
try:
# python >= 2.3
from optparse import OptionParser as BaseParser, Option as BaseOption, \
OptionGroup, OptionValueError, OptionError, Values, HelpFormatter, \
NO_DEFAULT
except ImportError:
src/m/o/moofs-HEAD/moofs/src/fuseparts/subbedopts.py moofs(Download)
# from optparse import Option, OptionParser, OptParseError, OptionConflictError from optparse import HelpFormatter, IndentedHelpFormatter, SUPPRESS_HELP from fuseparts.setcompatwrap import set ##########
class SubbedOptFormatter(HelpFormatter):
def format_option_strings(self, option):
if hasattr(option, "subopt") and option.subopt:
res = '-o ' + option.subopt
if option.takes_value():
res += "="
src/a/l/allmydata-tahoe-1.8.0/mac/fuseparts/subbedopts.py allmydata-tahoe(Download)
# from optparse import Option, OptionParser, OptParseError, OptionConflictError from optparse import HelpFormatter, IndentedHelpFormatter, SUPPRESS_HELP from fuseparts.setcompatwrap import set ##########
class SubbedOptFormatter(HelpFormatter):
def format_option_strings(self, option):
if hasattr(option, "subopt") and option.subopt:
res = '-o ' + option.subopt
if option.takes_value():
res += "="
1 | 2 | 3 Next