Module Expr Str Import alias Import alias Import alias Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign AttributeStore NameLoad attr NameLoad If NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign AttributeStore NameLoad attr NameLoad If NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index Num Str orelse Assign SubscriptStore AttributeLoad NameLoad attr Index Num Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad TryFinally body TryExcept body Assign NameStore Call NameLoad NameLoad Str handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Str NameLoad TryFinally body Assign NameStore Call AttributeLoad NameLoad attr finalbody Expr Call AttributeLoad NameLoad attr If CompareNotEq SubscriptLoad NameLoad Index Num Str body AugAssignAdd NameStore Str Assign NameStore Call NameLoad NameLoad NameLoad Str TryExcept body Exec NameLoad AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Raise ExceptHandler body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Raise Call NameLoad NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr finalbody Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign AttributeStore NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Num NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body ImportFrom alias If CompareIs NameLoad NameLoad body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Slice Num Assign NameStore Str Assign NameStore Call NameLoad keyword NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Slice NameLoad If CompareGt Call NameLoad NameLoad Num body Assign NameStore SubscriptLoad NameLoad Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad ImportFrom alias ImportFrom alias Assign NameStore Call NameLoad keyword UnaryOpNot AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr TryFinally body Expr Call NameLoad NameLoad NameLoad finalbody Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A 
peek.runner
~~~~~~~~~~~

A large majority of the CLI and its implementation are from Ned Batchelder's coverage.py.

:copyright: 2012 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
 N/A imp N/A os.path N/A sys N/A BUILTINS N/A N/A sys modules N/A __builtin__ ExceptionDuringRun N/A Exception N/A N/A N/A NoSource N/A Exception N/A N/A N/A run_python_file N/A N/A filename args package collector N/A None None N/A N/A Run a python file as if it were the main program on the command line.

    `filename` is the path to the file to execute, it need not be a .py file.
    `args` is the argument array to present as sys.argv, including the first
    element naming the file being executed.  `package` is the name of the
    enclosing package, if any.

     N/A old_main_mod N/A N/A sys modules N/A __main__ N/A main_mod N/A N/A imp new_module __main__ N/A N/A N/A sys modules N/A __main__ main_mod N/A N/A main_mod __file__ filename N/A package N/A N/A N/A main_mod __package__ package N/A N/A main_mod __builtins__ N/A N/A sys modules N/A __builtin__ N/A old_argv N/A sys argv N/A old_path0 N/A N/A sys path N/A 0 N/A N/A sys argv args N/A package N/A N/A N/A N/A sys path N/A 0 N/A N/A N/A N/A sys path N/A 0 N/A N/A N/A os path abspath N/A N/A N/A os path dirname filename N/A N/A N/A N/A N/A source_file N/A open filename rU N/A N/A N/A IOError N/A N/A N/A NoSource N/A No file to run: %r filename N/A N/A N/A source N/A N/A source_file read N/A N/A N/A N/A source_file close N/A N/A N/A source N/A -1 N/A N/A source N/A code N/A compile source filename exec N/A N/A N/A code N/A main_mod __dict__ N/A N/A N/A SystemExit N/A N/A N/A N/A N/A N/A typ err tb N/A N/A sys exc_info N/A N/A ExceptionDuringRun typ err N/A N/A tb tb_next tb_next N/A N/A N/A N/A sys modules N/A __main__ old_main_mod N/A N/A sys argv old_argv N/A N/A N/A sys path N/A 0 old_path0 N/A main N/A N/A argv N/A None N/A optparse OptionParser N/A N/A argv None N/A N/A argv N/A N/A sys argv N/A 1 N/A usage python -m peek [-o output_file_path] scriptfile [arg] ... N/A parser N/A OptionParser usage usage N/A N/A parser allow_interspersed_args False N/A N/A N/A parser add_option -o --output dest output help Save stats to <outfile> directory default None N/A N/A argv N/A N/A N/A N/A parser print_usage N/A N/A N/A sys exit 2 N/A N/A options args N/A N/A parser parse_args N/A N/A N/A sys argv N/A args N/A N/A N/A len args 0 N/A N/A progname N/A args N/A 0 N/A N/A N/A N/A sys path insert 0 N/A N/A N/A os path dirname progname peek.collector Collector peek.reporter HTMLReporter N/A collector N/A Collector log N/A N/A options output N/A N/A N/A collector start N/A N/A N/A N/A run_python_file progname args N/A N/A N/A N/A collector stop N/A reporter N/A HTMLReporter progname collector output N/A options output N/A N/A N/A reporter report N/A N/A N/A N/A parser print_usage N/A N/A N/A __name__ __main__ N/A N/A N/A main