Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(1)  |  Derive(2)  |  Import(0)
Object for parsing command line strings into Python objects.

Keyword Arguments:
    - prog -- The name of the program (default: sys.argv[0])
    - usage -- A usage message (default: auto-generated from arguments)
    - description -- A description of what the program does
    - epilog -- Text following the argument descriptions
    - parents -- Parsers whose arguments should be copied into this one
    - formatter_class -- HelpFormatter class for printing help messages
    - prefix_chars -- Characters that prefix optional arguments(more...)

src/p/y/pytest-2.5.2/testing/test_parseopt.py   pytest(Download)
    def test_drop_short_helper(self):
        parser = py.std.argparse.ArgumentParser(formatter_class=parseopt.DropShorterLongHelpFormatter)
        parser.add_argument('-t', '--twoword', '--duo', '--two-word', '--two',
                             help='foo').map_long_option = {'two': 'two-word'}
        # throws error on --deux only!

src/n/u/nupic-linux64-HEAD/lib/python2.6/site-packages/_pytest/config.py   nupic-linux64(Download)
class MyOptionParser(py.std.argparse.ArgumentParser):
    def __init__(self, parser):
        self._parser = parser
        py.std.argparse.ArgumentParser.__init__(self, usage=parser._usage,
            add_help=False, formatter_class=DropShorterLongHelpFormatter)

src/p/y/pytest-2.5.2/_pytest/config.py   pytest(Download)
class MyOptionParser(py.std.argparse.ArgumentParser):
    def __init__(self, parser):
        self._parser = parser
        py.std.argparse.ArgumentParser.__init__(self, usage=parser._usage,
            add_help=False, formatter_class=DropShorterLongHelpFormatter)