Module Expr Str ImportFrom alias alias alias alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ClassDef bases NameLoad body Expr Str Pass decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign SubscriptStore AttributeLoad NameLoad attr Index Str Dict Assign SubscriptStore AttributeLoad NameLoad attr Index Str ListLoad Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad body Return Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Raise Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad body Return Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad Raise Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return ListComp TupleLoad NameLoad Call AttributeLoad NameLoad attr comprehension TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad GeneratorExp AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call NameLoad GeneratorExp TupleLoad NameLoad Call AttributeLoad NameLoad attr comprehension TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BoolOpOr UnaryOpNot NameLoad CompareEq NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad GeneratorExp TupleLoad NameLoad Call AttributeLoad NameLoad attr comprehension TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str If CompareIn NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr If CompareEq NameLoad NameLoad body Assign NameStore Str If CompareIs NameLoad NameLoad body If BoolOpAnd UnaryOpNot NameLoad CompareIsNot NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore NameLoad If NameLoad body Assign NameStore NameLoad orelse Assign NameStore NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad For NameStore Call NameLoad Num Call NameLoad NameLoad body If UnaryOpNot Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Str body Assign NameStore SubscriptLoad NameLoad Slice NameLoad Break If CompareEq SubscriptLoad NameLoad Index NameLoad Str body Assign NameStore SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num Break Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Str Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Str If UnaryOpNot CompareIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Raise Call NameLoad BinOpMod Str NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad If UnaryOpNot NameLoad body If CompareEq AttributeLoad NameLoad attr NameLoad body Assign NameStore Str orelse Raise Call NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Dict With Call NameLoad NameLoad NameStore body Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad For NameStore NameLoad body If CompareIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr SubscriptLoad NameLoad Index NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Expr Call NameLoad BinOpMod Str SubscriptLoad AttributeLoad NameLoad attr Index Num keyword NameLoad Expr Call NameLoad Str keyword NameLoad Assign NameStore Dict For NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad attr NameLoad For TupleStore NameStore NameStore Call NameLoad Call AttributeLoad NameLoad attr body If NameLoad body Expr Call NameLoad BinOpMod Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults AttributeLoad NameLoad attr For NameStore NameLoad body Assign NameStore AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body AugAssignAdd NameStore BinOpAdd Str AttributeLoad NameLoad attr Assign NameStore BoolOpOr AttributeLoad NameLoad attr Str If BoolOpAnd CompareIsNot AttributeLoad NameLoad attr NameLoad CompareNotEq AttributeLoad NameLoad attr Str body AugAssignAdd NameStore BinOpMod Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpSub Num Num If BoolOpOr CompareGt Call NameLoad NameLoad Num CompareEq Call NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr Num Str Expr Call NameLoad BinOpMod Str TupleLoad NameLoad SubscriptLoad NameLoad Index Num keyword NameLoad For NameStore SubscriptLoad NameLoad Slice Num body Expr Call NameLoad BinOpMod Str TupleLoad Str NameLoad keyword NameLoad Expr Call NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If NameLoad body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body For NameStore AttributeLoad NameLoad attr body Expr Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str Dict decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assert CompareNotIn NameLoad AttributeLoad NameLoad attr Str Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call NameLoad AttributeLoad NameLoad attr NameLoad Expr Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body If BoolOpAnd CompareIs NameLoad NameLoad NameLoad body Assign NameStore ListLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return IfExp CompareIs AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad Dict AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr ListLoad For NameStore Call AttributeLoad NameLoad attr Str body If Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad Assign NameStore IfExp NameLoad Call NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad BinOpAdd NameLoad Num orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad orelse Assign AttributeStore NameLoad attr Call NameLoad NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad NameLoad attr body If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr For NameStore NameLoad body If BoolOpAnd CompareIsNot NameLoad NameLoad UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr orelse If BoolOpAnd CompareIsNot NameLoad NameLoad UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str Str FunctionDef arguments args NameParam NameParam defaults body For NameStore AttributeLoad NameLoad attr body TryExcept body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad handlers ExceptHandler type NameLoad body Pass Raise Call NameLoad BinOpMod Str NameLoad decorator_list Assign NameStore ListLoad TupleLoad Str ListLoad Str TupleLoad Str ListLoad Str Str TupleLoad Str ListLoad Str Str TupleLoad Str ListLoad Str TupleLoad Str ListLoad Str TupleLoad Str ListLoad Str TupleLoad Str ListLoad Str Assign NameStore Call NameLoad GeneratorExp TupleLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore NameLoad comprehension NameStore NameLoad Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Num While CompareLt NameLoad Call NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If UnaryOpNot NameLoad body Raise Call NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Num Assign NameStore BoolOpOr Call AttributeLoad NameLoad attr Num Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad AugAssignAdd NameStore Call AttributeLoad NameLoad attr Dict NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Return NameLoad handlers ExceptHandler type NameLoad body Raise decorator_list FunctionDef arguments args NameParam NameParam defaults body Return CompareNotIn Call AttributeLoad NameLoad attr TupleLoad Str Str Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad NameLoad decorator_list decorator_list Assign NameStore Call NameLoad Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Return Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body Expr Str Return Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Return Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Expr Call NameLoad NameLoad
N/A N/A A command line parsing module that lets modules define their own options.

Each module defines its own options which are added to the global
option namespace, e.g.::

    from tornado.options import define, options

    define("mysql_host", default="127.0.0.1:3306", help="Main user DB")
    define("memcache_hosts", default="127.0.0.1:11011", multiple=True,
           help="Main user memcache servers")

    def connect():
        db = database.Connection(options.mysql_host)
        ...

The ``main()`` method of your application does not need to be aware of all of
the options used throughout your program; they are all automatically loaded
when the modules are loaded.  However, all modules that define options
must have been imported before the command line is parsed.

Your ``main()`` method can parse the command line or parse a config file with
either::

    tornado.options.parse_command_line()
    # or
    tornado.options.parse_config_file("/etc/server.conf")

Command line formats are what you would expect (``--myoption=myvalue``).
Config files are just Python files. Global names become options, e.g.::

    myoption = "myvalue"
    myotheroption = "myothervalue"

We support `datetimes <datetime.datetime>`, `timedeltas
<datetime.timedelta>`, ints, and floats (just pass a ``type`` kwarg to
`define`). We also accept multi-value options. See the documentation for
`define()` below.

`tornado.options.options` is a singleton instance of `OptionParser`, and
the top-level functions in this module (`define`, `parse_command_line`, etc)
simply call methods on it.  You may create additional `OptionParser`
instances to define isolated sets of options, such as for subcommands.
 __future__ absolute_import division print_function with_statement N/A datetime N/A numbers N/A re N/A sys N/A os N/A textwrap tornado.escape _unicode tornado.log define_logging_options tornado stack_context tornado.util basestring_type exec_in Error N/A Exception N/A N/A Exception raised by errors in the options module. N/A N/A OptionParser N/A object N/A N/A A collection of options, a dictionary with object-like access.

    Normally accessed via static functions in the `tornado.options` module,
    which reference a global instance.
     __init__ N/A N/A self N/A N/A N/A N/A N/A self __dict__ N/A _options N/A N/A N/A N/A self __dict__ N/A _parse_callbacks N/A N/A N/A N/A self define help type bool help show this help information callback N/A self _help_callback N/A __getattr__ N/A N/A self name N/A N/A N/A N/A isinstance N/A N/A N/A self _options get name _Option N/A N/A N/A N/A N/A N/A self _options N/A name value N/A N/A AttributeError N/A Unrecognized option %r name N/A __setattr__ N/A N/A self name value N/A N/A N/A N/A isinstance N/A N/A N/A self _options get name _Option N/A N/A N/A N/A N/A N/A self _options N/A name set value N/A N/A AttributeError N/A Unrecognized option %r name N/A __iter__ N/A N/A self N/A N/A N/A N/A iter N/A self _options N/A __getitem__ N/A N/A self item N/A N/A N/A N/A N/A N/A N/A self _options N/A item value N/A items N/A N/A self N/A N/A N/A A sequence of (name, value) pairs.

        .. versionadded:: 3.1
         N/A N/A N/A name N/A N/A opt value N/A N/A name opt N/A N/A N/A self _options items N/A groups N/A N/A self N/A N/A N/A The set of option-groups created by ``define``.

        .. versionadded:: 3.1
         N/A N/A set N/A N/A opt group_name N/A opt N/A N/A N/A self _options values N/A group_dict N/A N/A self group N/A N/A N/A The names and values of options in a group.

        Useful for copying options into Application settings::

            from tornado.options import define, parse_command_line, options

            define('template_path', group='application')
            define('static_path', group='application')

            parse_command_line()

            application = Application(
                handlers, **options.group_dict('application'))

        .. versionadded:: 3.1
         N/A N/A dict N/A N/A name N/A N/A opt value N/A N/A name opt N/A N/A N/A self _options items N/A N/A group N/A group N/A opt group_name N/A as_dict N/A N/A self N/A N/A N/A The names and values of all options.

        .. versionadded:: 3.1
         N/A N/A dict N/A N/A name N/A N/A opt value N/A N/A name opt N/A N/A N/A self _options items N/A define N/A N/A self name default type help metavar multiple group callback N/A None None None None False None None N/A N/A Defines a new command line option.

        If ``type`` is given (one of str, float, int, datetime, or timedelta)
        or can be inferred from the ``default``, we parse the command line
        arguments based on the given type. If ``multiple`` is True, we accept
        comma-separated values, and the option value is always a list.

        For multi-value integers, we also accept the syntax ``x:y``, which
        turns into ``range(x, y)`` - very useful for long integer ranges.

        ``help`` and ``metavar`` are used to construct the
        automatically generated command line help string. The help
        message is formatted like::

           --name=METAVAR      help string

        ``group`` is used to group the defined options in logical
        groups. By default, command line options are grouped by the
        file in which they are defined.

        Command line option names must be unique globally. They can be parsed
        from the command line with `parse_command_line` or parsed from a
        config file with `parse_config_file`.

        If a ``callback`` is given, it will be run with the new value whenever
        the option is changed.  This can be used to combine command-line
        and file-based options::

            define("config", type=str, help="path to config file",
                   callback=lambda path: parse_config_file(path, final=False))

        With this definition, options in the file specified by ``--config`` will
        override options set earlier on the command line, but can be overridden
        by later flags.
         N/A N/A name N/A self _options N/A N/A N/A Error N/A Option %r already defined in %s N/A name N/A N/A N/A self _options N/A name file_name N/A frame N/A N/A sys _getframe 0 N/A options_file N/A N/A frame f_code co_filename N/A file_name N/A N/A N/A frame f_back f_code co_filename N/A N/A file_name options_file N/A N/A file_name N/A N/A type None N/A N/A N/A N/A multiple N/A default None N/A N/A type N/A default __class__ N/A N/A type str N/A group N/A N/A group_name group N/A N/A group_name file_name N/A N/A N/A self _options N/A name N/A _Option name file_name file_name default default type type help help metavar metavar multiple multiple group_name group_name callback callback N/A parse_command_line N/A N/A self args final N/A None True N/A N/A Parses all options given on the command line (defaults to
        `sys.argv`).

        Note that ``args[0]`` is ignored since it is the program name
        in `sys.argv`.

        We return a list of all arguments that are not parsed as options.

        If ``final`` is ``False``, parse callbacks will not be run.
        This is useful for applications that wish to combine configurations
        from multiple sources.
         N/A N/A args None N/A N/A args N/A sys argv N/A remaining N/A N/A i N/A range 1 N/A len args N/A N/A N/A N/A N/A N/A args N/A i startswith - N/A N/A remaining N/A args N/A i N/A N/A N/A N/A args N/A i -- N/A N/A remaining N/A args N/A N/A i 1 N/A N/A arg N/A N/A N/A args N/A i lstrip - N/A N/A name equals value N/A N/A arg partition = N/A name N/A N/A name replace - _ N/A N/A N/A name N/A self _options N/A N/A N/A N/A self print_help N/A N/A Error N/A Unrecognized command line option: %r name N/A option N/A N/A self _options N/A name N/A N/A equals N/A N/A N/A N/A option type bool N/A N/A value true N/A N/A N/A Error N/A Option %r requires a value name N/A N/A N/A option parse value N/A final N/A N/A N/A N/A self run_parse_callbacks N/A remaining N/A parse_config_file N/A N/A self path final N/A True N/A N/A Parses and loads the Python config file at the given path.

        If ``final`` is ``False``, parse callbacks will not be run.
        This is useful for applications that wish to combine configurations
        from multiple sources.
         N/A config N/A N/A N/A open path f N/A N/A N/A exec_in N/A N/A f read config config N/A name config N/A N/A N/A name N/A self _options N/A N/A N/A N/A N/A N/A self _options N/A name set N/A config N/A name N/A final N/A N/A N/A N/A self run_parse_callbacks N/A print_help N/A N/A self file N/A None N/A N/A Prints all the command line options to stderr (or another file). N/A N/A file None N/A N/A file N/A sys stderr N/A N/A print N/A Usage: %s [OPTIONS] N/A N/A sys argv N/A 0 file file N/A N/A print 
Options:
 file file N/A by_group N/A N/A option N/A N/A N/A self _options values N/A N/A N/A N/A N/A N/A by_group setdefault N/A option group_name N/A append option N/A N/A filename o N/A sorted N/A N/A by_group items N/A N/A filename N/A N/A N/A print N/A 
%s options:
 N/A N/A N/A os path normpath filename file file N/A N/A N/A o sort key N/A N/A N/A option N/A N/A option name N/A option o N/A N/A prefix N/A option name N/A N/A option metavar N/A N/A prefix N/A = N/A option metavar N/A description N/A N/A option help N/A N/A N/A N/A option default None N/A N/A option default N/A N/A description N/A  (default %s) N/A option default N/A lines N/A N/A textwrap wrap description N/A 79 35 N/A N/A N/A N/A len prefix 30 N/A N/A len lines 0 N/A N/A N/A N/A lines insert 0 N/A N/A print N/A   --%-30s %s N/A prefix N/A lines N/A 0 file file N/A line N/A lines N/A 1 N/A N/A N/A print N/A %-34s %s N/A line file file N/A N/A print file file N/A _help_callback N/A N/A self value N/A N/A N/A value N/A N/A N/A N/A self print_help N/A N/A N/A sys exit 0 N/A add_parse_callback N/A N/A self callback N/A N/A N/A Adds a parse callback, to be invoked when option parsing is done. N/A N/A N/A N/A self _parse_callbacks append N/A N/A stack_context wrap callback N/A run_parse_callbacks N/A N/A self N/A N/A N/A callback N/A self _parse_callbacks N/A N/A N/A callback N/A mockable N/A N/A self N/A N/A N/A Returns a wrapper around self that is compatible with
        `mock.patch <unittest.mock.patch>`.

        The `mock.patch <unittest.mock.patch>` function (included in
        the standard library `unittest.mock` package since Python 3.3,
        or in the third-party ``mock`` package for older versions of
        Python) is incompatible with objects like ``options`` that
        override ``__getattr__`` and ``__setattr__``.  This function
        returns an object that can be used with `mock.patch.object
        <unittest.mock.patch.object>` to modify option values::

            with mock.patch.object(options.mockable(), 'name', value):
                assert options.name == value
         N/A N/A _Mockable self N/A N/A _Mockable N/A object N/A N/A `mock.patch` compatible wrapper for `OptionParser`.

    As of ``mock`` version 1.0.1, when an object uses ``__getattr__``
    hooks instead of ``__dict__``, ``patch.__exit__`` tries to delete
    the attribute it set instead of setting a new one (assuming that
    the object does not catpure ``__setattr__``, so the patch
    created a new attribute in ``__dict__``).

    _Mockable's getattr and setattr pass through to the underlying
    OptionParser, and delattr undoes the effect of a previous setattr.
     __init__ N/A N/A self options N/A N/A N/A N/A N/A self __dict__ N/A _options options N/A N/A N/A self __dict__ N/A _originals N/A N/A __getattr__ N/A N/A self name N/A N/A N/A N/A getattr N/A self _options name N/A __setattr__ N/A N/A self name value N/A N/A N/A N/A name N/A self _originals don't reuse mockable objects N/A N/A N/A self _originals N/A name N/A getattr N/A self _options name N/A N/A setattr N/A self _options name value N/A __delattr__ N/A N/A self name N/A N/A N/A N/A setattr N/A self _options name N/A N/A N/A self _originals pop name N/A N/A _Option N/A object N/A __init__ N/A N/A self name default type help metavar multiple file_name group_name callback N/A None basestring_type None None False None None None N/A N/A N/A N/A default None multiple N/A N/A default N/A N/A N/A self name name N/A N/A self type type N/A N/A self help help N/A N/A self metavar metavar N/A N/A self multiple multiple N/A N/A self file_name file_name N/A N/A self group_name group_name N/A N/A self callback callback N/A N/A self default default N/A N/A self _value None N/A value N/A N/A self N/A N/A N/A N/A N/A N/A self _value None N/A self default N/A self _value N/A parse N/A N/A self value N/A N/A N/A _parse N/A N/A N/A N/A datetime datetime N/A datetime timedelta bool basestring_type N/A self _parse_datetime N/A self _parse_timedelta N/A self _parse_bool N/A self _parse_string get N/A self type N/A self type N/A N/A self multiple N/A N/A N/A self _value N/A N/A part N/A N/A value split , N/A N/A N/A issubclass N/A self type N/A numbers Integral N/A N/A N/A lo _ hi N/A N/A part partition : N/A lo N/A _parse lo N/A hi N/A hi N/A _parse hi lo N/A N/A N/A N/A self _value extend N/A range lo N/A hi 1 N/A N/A N/A N/A N/A self _value append N/A _parse part N/A N/A N/A self _value N/A _parse value N/A N/A N/A self callback None N/A N/A N/A N/A self callback N/A self _value N/A N/A N/A self value N/A set N/A N/A self value N/A N/A N/A N/A self multiple N/A N/A N/A N/A isinstance value list N/A N/A N/A Error N/A Option %r is required to be a list of %s N/A N/A self name N/A N/A self type __name__ N/A item value N/A N/A N/A N/A item None N/A N/A isinstance item N/A self type N/A N/A N/A Error N/A Option %r is required to be a list of %s N/A N/A self name N/A N/A self type __name__ N/A N/A N/A N/A value None N/A N/A isinstance value N/A self type N/A N/A N/A Error N/A Option %r is required to be a %s (%s given) N/A N/A self name N/A N/A self type __name__ N/A type value N/A N/A self _value value N/A N/A N/A self callback None N/A N/A N/A N/A self callback N/A self _value N/A N/A _DATETIME_FORMATS N/A %a %b %d %H:%M:%S %Y %Y-%m-%d %H:%M:%S %Y-%m-%d %H:%M %Y-%m-%dT%H:%M %Y%m%d %H:%M:%S %Y%m%d %H:%M %Y-%m-%d %Y%m%d %H:%M:%S %H:%M _parse_datetime N/A N/A self value N/A N/A N/A format N/A self _DATETIME_FORMATS N/A N/A N/A N/A N/A N/A N/A datetime datetime strptime value format N/A N/A N/A ValueError N/A N/A N/A N/A Error N/A Unrecognized date/time format: %r value N/A N/A _TIMEDELTA_ABBREVS N/A N/A hours N/A h N/A minutes N/A m min N/A seconds N/A s sec N/A milliseconds N/A ms N/A microseconds N/A us N/A days N/A d N/A weeks N/A w N/A _TIMEDELTA_ABBREV_DICT N/A dict N/A N/A abbrev full N/A N/A full abbrevs _TIMEDELTA_ABBREVS N/A abbrev abbrevs N/A _FLOAT_PATTERN [-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][-+]?\d+)? N/A _TIMEDELTA_PATTERN N/A N/A re compile N/A \s*(%s)\s*(\w*)\s* _FLOAT_PATTERN N/A re IGNORECASE _parse_timedelta N/A N/A self value N/A N/A N/A N/A N/A sum N/A N/A datetime timedelta N/A start 0 N/A N/A start N/A len value N/A N/A m N/A N/A N/A self _TIMEDELTA_PATTERN match value start N/A N/A m N/A N/A N/A Exception N/A num N/A float N/A N/A m group 1 N/A units N/A N/A N/A m group 2 seconds N/A units N/A N/A N/A self _TIMEDELTA_ABBREV_DICT get units units N/A sum N/A N/A datetime timedelta N/A units num N/A start N/A N/A m end N/A sum N/A N/A N/A Exception N/A N/A N/A _parse_bool N/A N/A self value N/A N/A N/A N/A N/A N/A value lower N/A false 0 f N/A _parse_string N/A N/A self value N/A N/A N/A N/A _unicode value N/A N/A N/A options N/A OptionParser N/A Global options object.

All defined options are available as attributes on this object.
 define N/A N/A name default type help metavar multiple group callback N/A None None None None False None None N/A N/A Defines an option in the global namespace.

    See `OptionParser.define`.
     N/A N/A N/A options define name default default type type help help metavar metavar multiple multiple group group callback callback N/A parse_command_line N/A N/A args final N/A None True N/A N/A Parses global options from the command line.

    See `OptionParser.parse_command_line`.
     N/A N/A N/A options parse_command_line args final final N/A parse_config_file N/A N/A path final N/A True N/A N/A Parses global options from a config file.

    See `OptionParser.parse_config_file`.
     N/A N/A N/A options parse_config_file path final final N/A print_help N/A N/A file N/A None N/A N/A Prints all the command line options to stderr (or another file).

    See `OptionParser.print_help`.
     N/A N/A N/A options print_help file N/A add_parse_callback N/A N/A callback N/A N/A N/A Adds a parse callback, to be invoked when option parsing is done.

    See `OptionParser.add_parse_callback`
     N/A N/A N/A options add_parse_callback callback N/A N/A N/A define_logging_options options