Module Expr Str ImportFrom alias Import alias ImportFrom alias Assign NameStore Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam defaults body Expr Str Pass decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str Str Str Str Str NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr If BoolOpAnd CompareEq SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Str CompareEq SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Str body Assign SubscriptStore AttributeLoad NameLoad attr Index Num SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Slice Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad If CompareNotEq NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice Num If AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore Num Assign NameStore NameLoad Assign NameStore Num Assign NameStore BinOpAdd Call NameLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign NameStore NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body If BoolOpAnd NameLoad CompareGt NameLoad Num body AugAssignSub NameStore Num Continue Assign NameStore NameLoad Assign NameStore Num If CompareNotEq Call AttributeLoad NameLoad attr Str Num body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Num NameLoad If BoolOpAnd UnaryOpNot Call AttributeLoad NameLoad attr Str CompareEq SubscriptLoad NameLoad Index Num Str CompareGt Call NameLoad NameLoad Num body For TupleStore NameStore NameStore Call NameLoad NameLoad body If CompareEq NameLoad Str body Continue Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd NameLoad Num NameLoad Call AttributeLoad Str attr NameLoad Continue If CompareNotIn NameLoad AttributeLoad NameLoad attr body If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad Assign SubscriptStore NameLoad Index Num Call AttributeLoad Str attr SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad NameLoad Index Num Break If BoolOpAnd NameLoad CompareNotEq SubscriptLoad NameLoad Index Num Str body AugAssignAdd NameStore Num Assign NameStore Call AttributeLoad Str attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad Assign NameStore AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr orelse If UnaryOpNot NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Expr Call AttributeLoad NameLoad attr keyword NameLoad orelse Expr Call NameLoad Call AttributeLoad Str attr NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad If AttributeLoad NameLoad attr body If CompareEq BinOpAdd NameLoad AttributeLoad NameLoad attr Call NameLoad NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore ListLoad For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad NameLoad Index BinOpAdd BinOpAdd NameLoad Num NameLoad If Call AttributeLoad NameLoad attr Str body Expr Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad Assign NameStore AttributeLoad NameLoad attr orelse If CompareIn NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore NameLoad body If BoolOpOr CompareEq NameLoad AttributeLoad NameLoad attr CompareEq NameLoad AttributeLoad NameLoad attr body Expr Call NameLoad If CompareLt NameLoad Call NameLoad AttributeLoad NameLoad attr body Expr Call NameLoad Str Expr Call AttributeLoad NameLoad attr keyword NameLoad For NameStore AttributeLoad NameLoad attr body If CompareNotIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Str If AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore AttributeLoad NameLoad attr Expr Call NameLoad Call AttributeLoad Str attr NameLoad For NameStore AttributeLoad NameLoad attr body If CompareNotIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad For NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr body If CompareNotIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr body If AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index Call AttributeLoad Str attr AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Expr Call NameLoad AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If AttributeLoad NameLoad attr body Expr Call NameLoad AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr Num Assign NameStore Str If AttributeLoad NameLoad attr body AugAssignAdd NameStore Call AttributeLoad Str attr Call AttributeLoad Str attr ListComp Call AttributeLoad AttributeLoad NameLoad attr attr Str comprehension NameStore AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body AugAssignAdd NameStore Call AttributeLoad Str attr Call AttributeLoad Str attr ListComp Call AttributeLoad Str attr ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body AugAssignAdd NameStore Call AttributeLoad Str attr Call AttributeLoad Str attr ListComp Call AttributeLoad Str attr ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body AugAssignAdd NameStore Call AttributeLoad Str attr Call AttributeLoad Str attr ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body AugAssignAdd NameStore Call AttributeLoad Str attr Call AttributeLoad Str attr ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body AugAssignAdd NameStore Str Expr Call NameLoad Call AttributeLoad Str attr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad If NameLoad body Expr Call NameLoad Str Expr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad If AttributeLoad NameLoad attr body Expr Call NameLoad Str For NameStore AttributeLoad NameLoad attr body Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call NameLoad Str For NameStore AttributeLoad NameLoad attr body If BoolOpAnd AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str orelse If AttributeLoad NameLoad attr body Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr keyword Str orelse Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr keyword Str Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call NameLoad Str For NameStore AttributeLoad NameLoad attr body Expr Call NameLoad AttributeLoad NameLoad attr keyword Str If BoolOpAnd AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad Str keyword Str Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call NameLoad Str For NameStore AttributeLoad NameLoad attr body Expr Call NameLoad AttributeLoad NameLoad attr keyword Str If BoolOpAnd AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad Str keyword Str Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call NameLoad Str For NameStore AttributeLoad NameLoad attr body Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call NameLoad Str For NameStore AttributeLoad NameLoad attr body Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index Call AttributeLoad Str attr AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str Str Str Str NameLoad Num Num NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Str Str NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Str Str NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Str Str NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Str Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign NameStore NameLoad For NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr body If CompareEq AttributeLoad NameLoad attr Str body Return If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore NameLoad If UnaryOpNot NameLoad body Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Str Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign NameStore NameLoad For NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr body If CompareEq AttributeLoad NameLoad attr Str body Return If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore NameLoad If UnaryOpNot NameLoad body Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body If CompareNotEq NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Str Str Str NameLoad body If BoolOpOr UnaryOpNot NameLoad CompareNotEq Call AttributeLoad NameLoad attr Str Num body Raise Call NameLoad Str Expr Call AttributeLoad Call NameLoad NameLoad 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 NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num If AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str Str Str Str Num NameLoad Num NameLoad body If UnaryOpNot NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad If BoolOpAnd AttributeLoad NameLoad attr CompareNotEq Call NameLoad AttributeLoad NameLoad attr Num body Raise Call NameLoad Str 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 If CompareNotEq NameLoad NameLoad body 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 AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body If CompareNotEq Call NameLoad NameLoad Num body Raise Call NameLoad Str If NameLoad body Assign AttributeStore NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body If UnaryOpNot Call AttributeLoad NameLoad attr Str body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body If CompareNotEq NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr decorator_list
N/A N/A 
Python 2.x / 3.x

clapp.py

v0.4.6

A library for building command line applications
 __future__ print_function N/A sys os path N/A __version__ 0.4.6 N/A __build__ 1 N/A __author__ Kevin K. <kbknapp@gmail.com> _null_func N/A N/A context N/A N/A N/A Represents a None for a function N/A N/A App N/A object N/A N/A The starting point for a command line application __init__ N/A N/A self name version usage about author main N/A _null_func N/A N/A Initializes a new version of the App class
        PARAMS:
            name: A string representing the name of the application
            version: A string representing the version of the application
            about: A string that displays what the application briefly doesn
            main: A function which accepts a dict() and the starting point of
                  the app will be called after all command line argumetns have
                  been processed
         N/A N/A self _name name N/A N/A self _author author N/A N/A self _version version N/A N/A self _args_map N/A dict N/A N/A self _raw_args N/A sys argv N/A N/A N/A N/A N/A N/A self _raw_args N/A 0 N/A 0 . N/A N/A N/A N/A self _raw_args N/A 0 N/A 1 / N/A N/A N/A N/A self _raw_args N/A 0 N/A N/A N/A self _raw_args N/A 0 N/A 2 N/A N/A self _about about N/A N/A self _usage usage N/A N/A self _has_main False N/A N/A main _null_func N/A N/A N/A self _has_main True N/A N/A self _main main N/A N/A self _context N/A dict N/A N/A self _subcmds_map N/A dict N/A N/A self _subcmds N/A N/A N/A self _req_opts N/A N/A N/A self _flags N/A N/A N/A self _req_pos_args N/A N/A N/A self _pos_args N/A N/A N/A self _opts N/A N/A start N/A N/A self N/A N/A N/A Called when the user wants to start processing command line arguments
        and start his main(context) function
        RETURN: Returns whatever your main(context) returns in order to allow
                sys.exit(app.start())
         N/A N/A N/A self _add_help N/A N/A N/A self _add_version N/A N/A N/A self _context N/A raw_args N/A sys argv N/A N/A N/A self _do_args N/A N/A sys argv N/A 1 N/A N/A self _has_main N/A N/A N/A N/A self _main N/A self _context N/A N/A self _context N/A _do_args N/A N/A self args N/A N/A N/A Validates the command line arguments passed to the script and performs
        any actions they call for.
        PARAMS:
            args: A list of command line arguments (pulled from sys.argv[1:])
         N/A actions_todo N/A N/A pos_args 0 N/A skip_next False N/A num_to_skip 0 N/A possible_pos_args N/A N/A len N/A self _pos_args N/A len N/A self _req_pos_args N/A subcmd None N/A N/A i arg N/A enumerate args N/A N/A N/A skip_next N/A num_to_skip 0 N/A N/A num_to_skip 1 N/A N/A skip_next False N/A num_to_skip 0 N/A N/A N/A N/A arg find = -1 N/A N/A N/A arg next_arg N/A N/A arg split = N/A N/A N/A args insert N/A i 1 next_arg N/A N/A N/A N/A N/A arg startswith -- N/A N/A arg N/A 0 - N/A N/A len arg 2 N/A N/A N/A j char N/A enumerate arg N/A N/A N/A char - N/A N/A N/A N/A N/A args insert N/A N/A i 1 j N/A N/A -{} format char N/A N/A N/A arg N/A self _args_map N/A N/A N/A arg N/A self _subcmds_map N/A N/A subcmd N/A N/A self _subcmds_map N/A arg N/A args N/A args N/A i N/A N/A args N/A 0 N/A N/A {} {} format N/A N/A self _raw_args N/A 0 N/A args N/A 0 N/A N/A N/A possible_pos_args N/A N/A arg N/A 0 - N/A N/A pos_args 1 N/A index N/A N/A index{} format pos_args N/A N/A N/A self _context N/A N/A N/A N/A self _args_map N/A index name arg N/A N/A N/A self _context N/A index arg N/A arg N/A N/A N/A self _args_map N/A index name N/A N/A N/A possible_pos_args N/A N/A N/A print N/A N/A Argument error from {}
{} doesn't accept positional arguments. format arg N/A N/A self _raw_args N/A 0 N/A N/A N/A self _display_usage exit True N/A N/A N/A print N/A N/A Argument error from {}
{} doesn't accept any arguments like {}. format arg N/A N/A self _raw_args N/A 0 arg N/A N/A N/A self _display_usage exit True N/A argo N/A N/A self _args_map N/A arg N/A N/A argo args_taken N/A N/A N/A N/A i N/A argo args_taken N/A len args N/A N/A N/A print N/A N/A Argument error from {}
{} expected {} arguments but received 0. format arg arg N/A argo args_taken N/A N/A N/A self _display_usage exit True N/A taken_args N/A N/A j N/A range N/A argo args_taken N/A N/A possible_arg N/A args N/A N/A N/A i 1 j N/A N/A N/A possible_arg startswith - N/A N/A N/A print N/A N/A Argument error from {}
{} expected {} arguments but received {}. format possible_arg arg N/A argo args_taken N/A len taken_args N/A N/A N/A self _display_usage exit True N/A N/A N/A taken_args append possible_arg N/A N/A N/A self _context N/A N/A argo name taken_args N/A N/A argo short N/A N/A N/A N/A self _context N/A N/A argo short taken_args N/A N/A argo long N/A N/A N/A N/A self _context N/A N/A argo long taken_args N/A skip_next True N/A num_to_skip N/A argo args_taken N/A N/A N/A argo N/A self _flags N/A N/A N/A N/A self _context N/A N/A argo name True N/A N/A argo short N/A N/A N/A N/A self _context N/A N/A argo short True N/A N/A argo long N/A N/A N/A N/A self _context N/A N/A argo long True N/A N/A argo has_action N/A N/A N/A N/A actions_todo append N/A argo action N/A act actions_todo N/A N/A N/A N/A act N/A self _display_version N/A act N/A self _display_help N/A N/A N/A act N/A N/A pos_args N/A len N/A self _req_pos_args N/A N/A N/A print Argument error.
Required number of positional arguments not found. N/A N/A N/A self _display_usage exit True N/A arg N/A self _req_opts N/A N/A N/A N/A arg name N/A self _context N/A N/A display_name N/A N/A arg long N/A N/A display_name N/A arg long N/A N/A display_name N/A arg short N/A N/A print N/A N/A Argument error.
Required option {} not found. format display_name N/A flag N/A self _flags N/A N/A N/A N/A flag name N/A self _context N/A N/A N/A N/A self _context N/A N/A flag name False N/A N/A flag short N/A N/A N/A N/A self _context N/A N/A flag short False N/A N/A flag long N/A N/A N/A N/A self _context N/A N/A flag long False N/A arg N/A set N/A N/A N/A self _args_map values N/A N/A N/A N/A arg name N/A self _context N/A N/A N/A arg default N/A N/A N/A N/A self _context N/A N/A arg name N/A arg default N/A N/A arg short N/A N/A N/A N/A self _context N/A N/A arg short N/A arg default N/A N/A arg long N/A N/A N/A N/A self _context N/A N/A arg long N/A arg default N/A N/A arg index N/A N/A N/A N/A self _context N/A N/A N/A index{} format N/A arg index N/A arg default N/A N/A N/A N/A self _context N/A N/A arg name False N/A N/A arg short N/A N/A N/A N/A self _context N/A N/A arg short False N/A N/A arg long N/A N/A N/A N/A self _context N/A N/A arg long False N/A N/A arg index N/A N/A N/A N/A self _context N/A N/A N/A index{} format N/A arg index False N/A act actions_todo N/A N/A N/A act N/A self _context N/A subcmd N/A N/A N/A N/A subcmd start args N/A _display_usage N/A N/A self exit N/A True N/A N/A  Displays usage of app based of flags and options
        name.py [flags] <req_opts> [opt_opts] <req_positional_args>
                [opt_positional_args]
        PARAMS:
            exit: Should sys.exit() be called at the conclusion of the function
         N/A N/A self _usage N/A N/A N/A print N/A self _usage N/A exit N/A N/A N/A N/A sys exit 0 N/A usage_str N/A N/A self _flags N/A N/A usage_str N/A N/A [-{}] format N/A N/A join N/A N/A N/A N/A arg short strip - N/A arg N/A self _flags N/A N/A self _opts N/A N/A usage_str N/A N/A  [{}] format N/A N/A join N/A N/A N/A join N/A N/A arg short N/A arg name N/A arg N/A self _opts N/A N/A self _req_opts N/A N/A usage_str N/A N/A  <{}> format N/A N/A join N/A N/A N/A join N/A N/A arg short N/A arg name N/A arg N/A self _req_opts N/A N/A self _req_pos_args N/A N/A usage_str N/A N/A  <{}> format N/A N/A join N/A N/A arg name N/A arg N/A self _req_pos_args N/A N/A self _pos_args N/A N/A usage_str N/A N/A  [{}] format N/A N/A join N/A N/A arg name N/A arg N/A self _pos_args N/A N/A self _subcmds N/A N/A usage_str  [SUBCOMMANDS] N/A N/A print N/A N/A 
USAGE:
{} {} format N/A N/A path basename N/A N/A self _raw_args N/A 0 usage_str N/A exit N/A N/A N/A print 
For more information try --help N/A N/A N/A sys exit 0 N/A _display_help N/A N/A self N/A N/A N/A Displays the possible command line arguemnts to the user and
        exits N/A N/A print N/A N/A 
{} v{}
{}
{} format N/A self name N/A self version N/A self author N/A self about N/A N/A N/A self _display_usage exit False N/A N/A self _subcmds N/A N/A N/A print 
SUB COMMANDS: N/A sc N/A self _subcmds N/A N/A N/A print N/A N/A {}		{} format N/A sc name N/A sc about N/A N/A self _flags N/A N/A N/A print 
FLAGS: N/A f N/A self _flags N/A N/A N/A N/A f short N/A f long N/A N/A N/A print N/A N/A {},{}	 format N/A f short N/A f long end N/A N/A N/A f short N/A N/A N/A print N/A N/A {}		 format N/A f short end N/A N/A N/A print N/A N/A {}	 format N/A f long end N/A N/A print N/A N/A {} format N/A f help N/A N/A self _opts N/A N/A N/A print 
OPTIONS: N/A o N/A self _opts N/A N/A N/A print N/A o short end N/A N/A N/A o short N/A o long N/A N/A N/A print , end N/A N/A print N/A N/A {}={}	{} format N/A o long N/A o name N/A o help N/A N/A self _req_opts N/A N/A N/A print 
REQUIRED OPTIONS: N/A ro N/A self _req_opts N/A N/A N/A print N/A ro short end N/A N/A N/A ro short N/A ro long N/A N/A N/A print , end N/A N/A print N/A N/A {}={}		{} format N/A ro long N/A ro name N/A ro help N/A N/A self _req_pos_args N/A N/A N/A print 
REQUIRED POSITIONAL ARGUMENTS: N/A rpo N/A self _req_pos_args N/A N/A N/A print N/A N/A {}		{} format N/A rpo name N/A rpo help N/A N/A self _pos_args N/A N/A N/A print 
OPTIONAL POSITIONAL ARGUMENTS: N/A po N/A self _pos_args N/A N/A N/A print N/A N/A {}		{} format N/A po name N/A po help N/A N/A N/A sys exit 0 N/A _display_version N/A N/A self context N/A None N/A N/A N/A print N/A N/A 
{} v{} format N/A self _name N/A self _version N/A N/A N/A sys exit 0 N/A _add_arg_to_map N/A N/A self arg N/A N/A N/A Builds a dict() of valid command line arguments based on
        Arg()s passed by the user.
         N/A N/A N/A self _args_map N/A N/A arg name arg N/A N/A arg short N/A N/A N/A N/A self _args_map N/A N/A arg short arg N/A N/A arg long N/A N/A N/A N/A self _args_map N/A N/A arg long arg N/A N/A arg index N/A N/A N/A N/A self _args_map N/A N/A N/A index{} format N/A arg index arg N/A N/A arg required N/A N/A N/A N/A N/A self _req_pos_args append arg N/A N/A N/A N/A N/A self _pos_args append arg N/A N/A N/A arg required N/A N/A N/A N/A N/A self _req_opts append arg N/A N/A N/A arg args_taken N/A N/A N/A N/A N/A self _opts append arg N/A N/A N/A N/A N/A self _flags append arg N/A _add_subcmd_to_map N/A N/A self subcmd N/A N/A N/A Builds a dict() of valid command line arguments based on Arg()s
        passed by the user. N/A N/A N/A self _subcmds_map N/A N/A subcmd name subcmd N/A N/A N/A N/A self _subcmds append subcmd N/A _debug N/A N/A self N/A N/A N/A Displays debugging info N/A N/A print N/A N/A Args dict:
{} format N/A self _args N/A N/A print N/A N/A Args List:
{} format N/A self args N/A N/A print N/A N/A Flags:
{} format N/A self _flags N/A N/A print N/A N/A Options:
{} format N/A self _opts N/A N/A print N/A N/A Req Opts:
{} format N/A self _req_opts N/A N/A print N/A N/A Pos:
{} format N/A self _pos_args N/A N/A print N/A N/A Req Pos:
{} format N/A self _req_pos_args N/A add_arg N/A N/A self arg N/A N/A N/A Add a single Arg() to the application
        PARAMS:
            arg: the clapp.Arg() to be added to the application
         N/A N/A N/A self _add_arg_to_map arg N/A add_args N/A N/A self args N/A N/A N/A Add multiple clapp.Arg()s to the application
        PARAMS:
            args: A collection (list, set, etc.) of clapp.Arg() objects
         N/A arg args N/A N/A N/A N/A self _add_arg_to_map arg N/A new_arg N/A N/A self name long short help default action index args_taken required N/A _null_func 0 0 False N/A N/A Create and add a clapp.Arg() to the application on the fly
        PARAMS:
            name: The unique name of the argument as a string
            long: A string of the long version of the argument (if any) i.e.
                  --help
            short: A string of the short version of the argument (if any)
                   i.e. -h
            help: A help string about the argument displayed to the user when
                  they use the --help
            action: A handler to be called if the user calls this argument
                    (must accept a dict())
            index: Used for positional arguments (Note: 1 based, **NOT** 0
                   based)
            args_taken: Int representing how many expected additional
                        arguments i.e. -o <file>
            required: Is this argument mandatory for proper script
                      functionality? N/A arg N/A Arg name long long short short help help default default action action index index args_taken args_taken required required N/A N/A N/A self _add_arg_to_map arg N/A new_subcommand_with_arg N/A N/A self name arg about version main N/A _null_func N/A N/A Create and add a clapp.Arg() to the application on the fly
        PARAMS:
            name: The unique name of the sub-command as a string
            arg: The clapp.Arg() to add to the sub-command
         N/A subcmd N/A SubCommand name version version about about main main N/A N/A N/A subcmd add_arg arg N/A N/A N/A self add_subcommand subcmd N/A new_subcommand_with_args N/A N/A self name args about version main N/A _null_func N/A N/A Create and add a clapp.Arg() to the application on the fly
        PARAMS:
            name: The unique name of the sub-command as a string
            arg: The clapp.Arg() to add to the sub-command
         N/A subcmd N/A SubCommand name version version about about main main N/A N/A N/A subcmd add_args args N/A N/A N/A self add_subcommand subcmd N/A new_subcommand N/A N/A self name about version main N/A _null_func N/A N/A Create and add a clapp.Arg() to the application on the fly
        PARAMS:
            name: The unique name of the sub-command as a string
            arg_name: A unique name of the sub-command argument as a string
            long: A string of the long version of the argument (if any) i.e.
                  --help
            short: A string of the short version of the argument (if any) i.e.
                   -h
            help: A help string about the argument displayed to the user when
                  they use the --help
            action: A handler to be called if the user calls this argument
                    (must accept a dict())
            index: Used for positional arguments (Note: 1 based, **NOT** 0
                   based)
            args_taken: Int representing how many expected additional
                        arguments i.e. -o <file>
            required: Is this argument mandatory for proper script
                      functionality? N/A subcmd N/A SubCommand name version version about about main main N/A N/A N/A self add_subcommand subcmd N/A add_subcommand N/A N/A self subcmd N/A N/A N/A N/A N/A self _add_subcmd_to_map subcmd N/A add_subcommands N/A N/A self subcmds N/A N/A N/A sc subcmds N/A N/A N/A N/A self add_subcommand sc N/A _add_help N/A N/A self N/A N/A N/A Determines if the user provided his own --help or -h arguments
        and adds a default implementation if it doesn't find any
         N/A help N/A Arg help N/A N/A help action N/A self _display_help N/A N/A help help Display help information N/A has_short False N/A arg N/A set N/A N/A N/A self _args_map values N/A N/A N/A N/A arg long --help N/A N/A N/A N/A N/A arg short -h N/A N/A has_short True N/A N/A has_short N/A N/A N/A help short -h N/A N/A help long --help N/A N/A N/A self add_arg help N/A _add_version N/A N/A self N/A N/A N/A Determines if the user provided his own --version or -v arguments
        and adds a default implementation if it doesn't find any
         N/A version N/A Arg version N/A N/A version action N/A self _display_version N/A N/A version help Display version information N/A has_short False N/A arg N/A set N/A N/A N/A self _args_map values N/A N/A N/A N/A arg long --version N/A N/A N/A N/A N/A arg short -v N/A N/A has_short True N/A N/A has_short N/A N/A N/A version short -v N/A N/A version long --version N/A N/A N/A self add_arg version N/A name N/A N/A self N/A N/A N/A N/A self _name N/A property name N/A N/A self value N/A N/A N/A N/A self _name value N/A N/A name setter author N/A N/A self N/A N/A N/A N/A self _author N/A property author N/A N/A self value N/A N/A N/A N/A self _author value N/A N/A author setter version N/A N/A self N/A N/A N/A N/A self _version N/A property version N/A N/A self value N/A N/A N/A N/A self _version value N/A N/A version setter about N/A N/A self N/A N/A N/A N/A self _about N/A property about N/A N/A self value N/A N/A N/A N/A self _about value N/A N/A about setter has_main N/A N/A self N/A N/A N/A N/A self _has_main N/A property main N/A N/A self N/A N/A N/A N/A self _main N/A property main N/A N/A self value N/A N/A N/A N/A value _null_func N/A N/A N/A self _has_main True N/A N/A self _main value N/A N/A main setter usage N/A N/A self N/A N/A N/A N/A self _usage N/A property usage N/A N/A self value N/A N/A N/A N/A self _usage value N/A N/A usage setter N/A SubCommand N/A App N/A __init__ N/A N/A self name version about usage main N/A _null_func N/A N/A N/A N/A name N/A N/A N/A name find -1 N/A N/A N/A RuntimeError SubCommand must have aunique name with no spaces. N/A N/A N/A N/A super SubCommand self __init__ name N/A N/A self _version version N/A N/A self _about about N/A N/A self _main main N/A N/A self _usage usage N/A start N/A N/A self args N/A N/A N/A Called when the user wants to start processing command line arguments
        and start his main(context) function
        PARAMS:
            args: a list of arguments supplied to the script
        RETURN: Returns whatever your main(context) returns in order to allow
                sys.exit(app.start())
         N/A N/A N/A self _add_help N/A N/A N/A self _add_version N/A N/A self _raw_args args N/A N/A N/A self _context N/A raw_args args N/A N/A N/A self _do_args N/A args N/A 1 N/A N/A self _has_main N/A N/A N/A N/A self _main N/A self _context N/A N/A self _context N/A N/A Arg N/A object N/A __init__ N/A N/A self name short long help default args_taken action index required N/A 0 _null_func 0 False N/A N/A N/A name N/A N/A N/A RuntimeError Arg(name) must have a unique name string. N/A N/A self _short short N/A N/A N/A self _short N/A N/A len N/A self _short 2 N/A N/A N/A RuntimeError Arg.short wrong format. Must be "-h" style. N/A N/A self _long long N/A N/A self _help help N/A N/A self _default default N/A N/A self _required required N/A N/A self _has_action False N/A N/A action _null_func N/A N/A N/A self _has_action True N/A N/A self _action action N/A N/A self _index index N/A N/A self _name name N/A N/A self _args_taken args_taken N/A name N/A N/A self N/A N/A N/A N/A self _name N/A property default N/A N/A self N/A N/A N/A N/A self _default N/A property default N/A N/A self value N/A N/A N/A N/A self _default value N/A N/A default setter short N/A N/A self N/A N/A N/A N/A self _short N/A property short N/A N/A self value N/A N/A N/A N/A N/A len value 2 N/A N/A N/A RuntimeError Arg.short wrong format. Must be "-x" style. N/A value N/A N/A N/A self _short value N/A N/A short setter long N/A N/A self N/A N/A N/A N/A self _long N/A property long N/A N/A self value N/A N/A N/A N/A N/A N/A value startswith -- N/A N/A N/A RuntimeError Arg.long wrong format. Must be "--xx" style. N/A N/A self _long value N/A N/A long setter help N/A N/A self N/A N/A N/A N/A self _help N/A property help N/A N/A self value N/A N/A N/A N/A self _help value N/A N/A help setter required N/A N/A self N/A N/A N/A N/A self _required N/A property required N/A N/A self value N/A N/A N/A N/A self _required value N/A N/A required setter has_action N/A N/A self N/A N/A N/A N/A self _has_action N/A property action N/A N/A self N/A N/A N/A N/A self _action N/A property action N/A N/A self value N/A N/A N/A N/A value _null_func N/A N/A N/A self _has_action True N/A N/A self _action value N/A N/A action setter index N/A N/A self N/A N/A N/A N/A self _index N/A property index N/A N/A self value N/A N/A N/A N/A self _index value N/A N/A index setter args_taken N/A N/A self N/A N/A N/A N/A self _args_taken N/A property args_taken N/A N/A self value N/A N/A N/A N/A self _args_taken value N/A N/A args_taken setter N/A