Module ImportFrom alias alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str Pass decorator_list ClassDef bases NameLoad body Expr Str Pass decorator_list ClassDef bases NameLoad body Expr Str Pass decorator_list ClassDef bases NameLoad body Expr Str Pass decorator_list ClassDef bases NameLoad body Expr Str Pass decorator_list ClassDef bases NameLoad body Expr Str Pass decorator_list ClassDef bases NameLoad body Expr Str Pass decorator_list ClassDef bases NameLoad body Expr Str Pass decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults kwarg body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad TupleLoad TupleLoad NameLoad NameLoad Str NameLoad body Expr Str If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore ListLoad NameLoad Assign NameStore ListComp Call AttributeLoad NameLoad attr Str comprehension NameStore NameLoad Assign NameStore ListComp Call AttributeLoad NameLoad attr Str comprehension NameStore NameLoad Assign NameStore ListComp Call AttributeLoad NameLoad attr Str comprehension NameStore NameLoad FunctionDef arguments args NameParam defaults body If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr If CompareEq Call NameLoad NameLoad Num body Assign NameStore SubscriptLoad NameLoad Index Num orelse Assign NameStore Str orelse Assign NameStore NameLoad Assign NameStore IfExp CompareIs NameLoad NameLoad Call NameLoad NameLoad NameLoad If UnaryOpNot NameLoad body Assign NameStore Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args defaults vararg kwarg body Expr Str FunctionDef arguments args NameParam defaults body Return Call Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Str NameLoad NameLoad NameLoad decorator_list Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad Str kwarg body Assign AttributeStore NameLoad attr Str If BoolOpAnd CompareIn Str NameLoad NameLoad CompareIsNot NameLoad NameLoad body AugAssignAdd SubscriptStore NameLoad Index Str BinOpMod Str TupleLoad NameLoad Expr Call Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad NameLoad NameLoad Assign NameStore Call NameLoad ListLoad If NameLoad body If CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr ListLoad orelse If Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Assign AttributeStore NameLoad attr Call NameLoad NameLoad orelse Assign AttributeStore NameLoad attr ListLoad NameLoad orelse Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareIs NameLoad NameLoad body Return NameLoad orelse Return Call AttributeLoad Call NameLoad NameLoad AttributeLoad NameLoad attr Dict attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareIs NameLoad NameLoad body Raise Call NameLoad Str orelse If UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Dict NameLoad NameLoad orelse Assign SubscriptStore Call NameLoad NameLoad AttributeLoad NameLoad attr Index NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad kwarg body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad UnaryOpNot AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults Num kwarg body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults vararg kwarg body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Slice Num Assign NameStore BinOpMult ListLoad NameLoad Call NameLoad NameLoad Assign NameStore NameLoad For NameStore Call NameLoad Call NameLoad Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad If CompareEq BinOpAdd Call NameLoad NameLoad Num Call NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num For NameStore AttributeLoad NameLoad attr body If CompareEq NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse Assign SubscriptStore NameLoad Index Call AttributeLoad NameLoad attr NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults body Expr Str decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults Str body Expr Str Return Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict For NameStore AttributeLoad NameLoad attr body For NameStore Call NameLoad NameLoad Str TupleLoad body If CompareNotEq SubscriptLoad NameLoad Index Num Str body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad NameLoad Assign NameStore GeneratorExp Call AttributeLoad Str attr NameLoad SubscriptLoad NameLoad Index NameLoad comprehension NameStore NameLoad Return Call AttributeLoad Str attr AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore TupleLoad Str Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad If BoolOpOr CompareLt NameLoad AttributeLoad NameLoad attr CompareGt NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Return Call NameLoad Call NameLoad AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr Num decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults vararg kwarg body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad GeneratorExp TupleLoad IfExp AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str Call AttributeLoad Str attr GeneratorExp Call NameLoad NameLoad comprehension NameStore Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr If CompareNotIn NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Return Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Return Call NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad Return NameLoad decorator_list NameLoad
N/A plumbum.lib six getdoc plumbum local abc abstractmethod SwitchError N/A Exception N/A N/A A general switch related-error (base class of all other switch errors) N/A N/A PositionalArgumentsError N/A SwitchError N/A N/A Raised when an invalid number of positional arguments has been given N/A N/A SwitchCombinationError N/A SwitchError N/A N/A Raised when an invalid combination of switches has been given N/A N/A UnknownSwitch N/A SwitchError N/A N/A Raised when an unrecognized switch has been given N/A N/A MissingArgument N/A SwitchError N/A N/A Raised when a switch requires an argument, but one was not provided N/A N/A MissingMandatorySwitch N/A SwitchError N/A N/A Raised when a mandatory switch has not been given N/A N/A WrongArgumentType N/A SwitchError N/A N/A Raised when a switch expected an argument of some type, but an argument of a wrong
    type has been given N/A N/A SubcommandError N/A SwitchError N/A N/A Raised when there's something wrong with subcommands N/A N/A SwitchInfo N/A object N/A __init__ N/A N/A self N/A kwargs N/A N/A N/A k v N/A N/A kwargs items N/A N/A N/A setattr self k v N/A N/A switch N/A N/A names argtype argname list mandatory requires excludes help overridable group envname N/A None None False False N/A N/A None False Switches None N/A N/A 
    A decorator that exposes functions as command-line switches. Usage::

        class MyApp(Application):
            @switch(["-l", "--log-to-file"], argtype = str)
            def log_to_file(self, filename):
                handler = logging.FileHandler(filename)
                logger.addHandler(handler)

            @switch(["--verbose"], excludes=["--terse"], requires=["--log-to-file"])
            def set_debug(self):
                logger.setLevel(logging.DEBUG)

            @switch(["--terse"], excludes=["--verbose"], requires=["--log-to-file"])
            def set_terse(self):
                logger.setLevel(logging.WARNING)

    :param names: The name(s) under which the function is reachable; it can be a string
                  or a list of string, but at least one name is required. There's no need
                  to prefix the name with ``-`` or ``--`` (this is added automatically),
                  but it can be used for clarity. Single-letter names are prefixed by ``-``,
                  while longer names are prefixed by ``--``

    :param envname:   Name of environment variable to extract value from, as alternative to argv

    :param argtype: If this function takes an argument, you need to specify its type. The
                    default is ``None``, which means the function takes no argument. The type
                    is more of a "validator" than a real type; it can be any callable object
                    that raises a ``TypeError`` if the argument is invalid, or returns an
                    appropriate value on success. If the user provides an invalid value,
                    :func:`plumbum.cli.WrongArgumentType`

    :param argname: The name of the argument; if ``None``, the name will be inferred from the
                    function's signature

    :param list: Whether or not this switch can be repeated (e.g. ``gcc -I/lib -I/usr/lib``).
                 If ``False``, only a single occurrence of the switch is allowed; if ``True``,
                 it may be repeated indefinitely. The occurrences are collected into a list,
                 so the function is only called once with the collections. For instance,
                 for ``gcc -I/lib -I/usr/lib``, the function will be called with
                 ``["/lib", "/usr/lib"]``.

    :param mandatory: Whether or not this switch is mandatory; if a mandatory switch is not
                      given, :class:`MissingMandatorySwitch <plumbum.cli.MissingMandatorySwitch>`
                      is raised. The default is ``False``.

    :param requires: A list of switches that this switch depends on ("requires"). This means that
                     it's invalid to invoke this switch without also invoking the required ones.
                     In the example above, it's illegal to pass ``--verbose`` or ``--terse``
                     without also passing ``--log-to-file``. By default, this list is empty,
                     which means the switch has no prerequisites. If an invalid combination
                     is given, :class:`SwitchCombinationError <plumbum.cli.SwitchCombinationError>`
                     is raised.

                     Note that this list is made of the switch *names*; if a switch has more
                     than a single name, any of its names will do.

                     .. note::
                        There is no guarantee on the (topological) order in which the actual
                        switch functions will be invoked, as the dependency graph might contain
                        cycles.

    :param excludes: A list of switches that this switch forbids ("excludes"). This means that
                     it's invalid to invoke this switch if any of the excluded ones are given.
                     In the example above, it's illegal to pass ``--verbose`` along with
                     ``--terse``, as it will result in a contradiction. By default, this list
                     is empty, which means the switch has no prerequisites. If an invalid
                     combination is given, :class:`SwitchCombinationError
                     <plumbum.cli.SwitchCombinationError>` is raised.

                     Note that this list is made of the switch *names*; if a switch has more
                     than a single name, any of its names will do.

    :param help: The help message (description) for this switch; this description is used when
                 ``--help`` is given. If ``None``, the function's docstring will be used.

    :param overridable: Whether or not the names of this switch are overridable by other switches.
                        If ``False`` (the default), having another switch function with the same
                        name(s) will cause an exception. If ``True``, this is silently ignored.

    :param group: The switch's *group*; this is a string that is used to group related switches
                  together when ``--help`` is given. The default group is ``Switches``.

    :returns: The decorated function (with a ``_switch_info`` attribute)
     N/A N/A isinstance names N/A six string_types N/A N/A names N/A names N/A names N/A N/A N/A n lstrip - N/A n names N/A requires N/A N/A N/A n lstrip - N/A n requires N/A excludes N/A N/A N/A n lstrip - N/A n excludes deco N/A N/A func N/A N/A N/A N/A argname None N/A N/A argspec N/A N/A N/A six getfullargspec func args N/A N/A N/A len argspec 2 N/A N/A argname2 N/A argspec N/A 1 N/A N/A argname2 VALUE N/A N/A argname2 argname N/A help2 N/A N/A help None N/A getdoc func help N/A N/A help2 N/A N/A help2 N/A str func N/A N/A func _switch_info N/A SwitchInfo names names envname envname argtype argtype list list func func mandatory mandatory overridable overridable group group requires requires excludes excludes argname argname2 help help2 N/A func N/A N/A deco N/A autoswitch N/A N/A N/A args kwargs N/A N/A A decorator that exposes a function as a switch, "inferring" the name of the switch
    from the function's name (converting to lower-case, and replacing underscores with hyphens).
    The arguments are the same as for :func:`switch <plumbum.cli.switch>`. deco N/A N/A func N/A N/A N/A N/A N/A switch N/A N/A N/A func __name__ replace _ - args kwargs func N/A N/A deco N/A SwitchAttr N/A object N/A N/A 
    A switch that stores its result in an attribute (descriptor). Usage::

        class MyApp(Application):
            logfile = SwitchAttr(["-f", "--log-file"], str)

            def main(self):
                if self.logfile:
                    open(self.logfile, "w")

    :param names: The switch names
    :param argtype: The switch argument's (and attribute's) type
    :param default: The attribute's default value (``None``)
    :param argname: The switch argument's name (default is ``"VALUE"``)
    :param kwargs: Any of the keyword arguments accepted by :func:`switch <plumbum.cli.switch>`
     N/A ATTR_NAME __plumbum_switchattr_dict__ __init__ N/A N/A self names argtype default list argname N/A str None False VALUE kwargs N/A N/A N/A self __doc__ Sets an attribute N/A N/A N/A help kwargs default N/A argtype None N/A N/A N/A kwargs N/A help N/A ; the default is %r N/A default N/A N/A N/A switch names argtype argtype argname argname list list kwargs self N/A listtype N/A type N/A N/A list N/A N/A N/A default None N/A N/A N/A self _default_value N/A N/A N/A N/A isinstance default N/A tuple listtype N/A N/A N/A self _default_value N/A listtype default N/A N/A N/A self _default_value N/A default N/A N/A N/A self _default_value default N/A __call__ N/A N/A self inst val N/A N/A N/A N/A N/A self __set__ inst val N/A __get__ N/A N/A self inst cls N/A N/A N/A N/A inst None N/A N/A self N/A N/A N/A N/A N/A getattr inst N/A self ATTR_NAME N/A get self N/A self _default_value N/A __set__ N/A N/A self inst val N/A N/A N/A N/A inst None N/A N/A N/A AttributeError cannot set an unbound SwitchAttr N/A N/A N/A N/A hasattr inst N/A self ATTR_NAME N/A N/A N/A setattr inst N/A self ATTR_NAME N/A self val N/A N/A N/A N/A getattr inst N/A self ATTR_NAME N/A self val N/A N/A Flag N/A SwitchAttr N/A N/A A specialized :class:`SwitchAttr <plumbum.cli.SwitchAttr>` for boolean flags. If the flag is not
    given, the value of this attribute is the ``default``; if it is given, the value changes
    to ``not default``. Usage::

        class MyApp(Application):
            verbose = Flag(["-v", "--verbose"], help = "If given, I'll be very talkative")

    :param names: The switch names
    :param default: The attribute's initial value (``False`` by default)
    :param kwargs: Any of the keyword arguments accepted by :func:`switch <plumbum.cli.switch>`,
                   except for ``list`` and ``argtype``.
     __init__ N/A N/A self names default N/A False kwargs N/A N/A N/A N/A SwitchAttr __init__ self names argtype None default default list False kwargs N/A __call__ N/A N/A self inst N/A N/A N/A N/A N/A self __set__ inst N/A N/A self _default_value N/A N/A CountOf N/A SwitchAttr N/A N/A A specialized :class:`SwitchAttr <plumbum.cli.SwitchAttr>` that counts the number of
    occurrences of the switch in the command line. Usage::

        class MyApp(Application):
            verbosity = CountOf(["-v", "--verbose"], help = "The more, the merrier")

    If ``-v -v -vv`` is given in the command-line, it will result in ``verbosity = 4``.

    :param names: The switch names
    :param default: The default value (0)
    :param kwargs: Any of the keyword arguments accepted by :func:`switch <plumbum.cli.switch>`,
                   except for ``list`` and ``argtype``.
     __init__ N/A N/A self names default N/A 0 kwargs N/A N/A N/A N/A SwitchAttr __init__ self names argtype None default default list True kwargs N/A N/A self _default_value default N/A __call__ N/A N/A self inst v N/A N/A N/A N/A N/A self __set__ inst N/A len v N/A N/A positional N/A object N/A N/A 
    Runs a validator on the main function for a class.    
    This should be used like this::
    
        class MyApp(cli.Application):
            @cli.positional(cli.Range(1,10), cli.ExistingFile)
            def main(self, x, *f):
                # x is a range, f's are all ExistingFile's)
    
    Or, Python 3 only::
    
        class MyApp(cli.Application):
            def main(self, x : cli.Range(1,10), *f : cli.ExistingFile):
                # x is a range, f's are all ExistingFile's)
        
        
    If you do not want to validate on the annotations, use this decorator (
    even if empty) to override annotation validation.
    
    Validators should be callable, and should have a ``.choices()`` function with
    possible choices. (For future argument completion, for example)
    
    Default arguments do not go through the validator.
    
    #TODO: Check with MyPy
    
     __init__ N/A N/A self N/A args kargs N/A N/A N/A self args args N/A N/A self kargs kargs N/A __call__ N/A N/A self function N/A N/A N/A m N/A N/A six getfullargspec function N/A args_names N/A list N/A N/A m args N/A 1 N/A positional N/A N/A None N/A len args_names N/A varargs None N/A i N/A range N/A min N/A len positional N/A len N/A self args N/A N/A N/A positional N/A i N/A N/A self args N/A i N/A N/A N/A N/A len args_names 1 N/A len N/A self args N/A N/A varargs N/A N/A self args N/A -1 N/A item N/A self kargs N/A N/A N/A item N/A m varargs N/A N/A varargs N/A N/A self kargs N/A item N/A N/A N/A positional N/A N/A N/A args_names index item N/A N/A self kargs N/A item N/A N/A function positional positional N/A N/A function positional_varargs varargs N/A function N/A N/A Validator N/A N/A six ABC N/A N/A __slots__ __weakref__ __call__ N/A N/A self obj N/A N/A N/A Must be implemented for a Validator to work N/A abstractmethod choices N/A N/A self partial N/A N/A N/A Should return set of valid choices, can be given optional partial info N/A N/A set N/A __repr__ N/A N/A self N/A N/A N/A If not overridden, will print the slots as args N/A slots N/A N/A cls N/A self __mro__ N/A N/A prop N/A getattr cls __slots__ N/A N/A N/A N/A N/A prop N/A 0 _ N/A N/A N/A slots N/A prop N/A getattr self prop N/A mystrs N/A N/A N/A {0} = {1} format name N/A slots N/A name N/A name slots N/A N/A N/A {0}({1}) format N/A N/A self __class__ __name__ N/A N/A ,  join mystrs N/A N/A Range N/A Validator N/A N/A 
    A switch-type validator that checks for the inclusion of a value in a certain range.
    Usage::

        class MyApp(Application):
            age = SwitchAttr(["--age"], Range(18, 120))

    :param start: The minimal value
    :param end: The maximal value
     N/A __slots__ N/A start end __init__ N/A N/A self start end N/A N/A N/A N/A self start start N/A N/A self end end N/A __repr__ N/A N/A self N/A N/A N/A N/A [%d..%d] N/A N/A self start N/A self end N/A __call__ N/A N/A self obj N/A N/A N/A obj N/A int obj N/A N/A N/A obj N/A self start N/A obj N/A self end N/A N/A N/A ValueError N/A Not in range [%d..%d] N/A N/A self start N/A self end N/A obj N/A choices N/A N/A self partial N/A N/A N/A N/A set N/A range N/A self start N/A N/A self end 1 N/A N/A Set N/A Validator N/A N/A 
    A switch-type validator that checks that the value is contained in a defined
    set of values. Usage::

        class MyApp(Application):
            mode = SwitchAttr(["--mode"], Set("TCP", "UDP", case_sensitive = False))

    :param values: The set of values (strings)
    :param case_sensitive: A keyword argument that indicates whether to use case-sensitive
                             comparison or not. The default is ``False``
     __init__ N/A N/A self N/A values kwargs N/A N/A N/A self case_sensitive N/A N/A kwargs pop case_sensitive False N/A kwargs N/A N/A N/A TypeError N/A got unexpected keyword argument(s): %r N/A N/A N/A kwargs keys N/A N/A self values N/A dict N/A N/A N/A N/A self case_sensitive v N/A N/A v lower v N/A v values N/A __repr__ N/A N/A self N/A N/A N/A N/A {%s} N/A N/A ,  join N/A N/A repr v N/A v N/A N/A N/A self values values N/A __call__ N/A N/A self obj N/A N/A N/A N/A N/A self case_sensitive N/A N/A obj N/A N/A obj lower N/A N/A obj N/A self values N/A N/A N/A ValueError N/A Expected one of %r N/A N/A list N/A N/A N/A self values values N/A N/A N/A self values N/A obj N/A choices N/A N/A self partial N/A N/A N/A N/A set N/A self values N/A N/A Predicate N/A object N/A N/A A wrapper for a single-argument function with pretty printing __init__ N/A N/A self func N/A N/A N/A N/A self func func N/A __str__ N/A N/A self N/A N/A N/A N/A N/A self func __name__ N/A __call__ N/A N/A self val N/A N/A N/A N/A N/A self func val N/A choices N/A N/A self partial N/A N/A N/A N/A set N/A N/A ExistingDirectory N/A N/A val N/A N/A N/A A switch-type validator that ensures that the given argument is an existing directory N/A p N/A N/A local path val N/A N/A N/A N/A p is_dir N/A N/A N/A ValueError N/A %r is not a directory N/A val N/A p N/A Predicate ExistingFile N/A N/A val N/A N/A N/A A switch-type validator that ensures that the given argument is an existing file N/A p N/A N/A local path val N/A N/A N/A N/A p is_file N/A N/A N/A ValueError N/A %r is not a file N/A val N/A p N/A Predicate NonexistentPath N/A N/A val N/A N/A N/A A switch-type validator that ensures that the given argument is a nonexistent path N/A p N/A N/A local path val N/A N/A N/A p exists N/A N/A N/A ValueError N/A %r already exists N/A val N/A p N/A Predicate