Module Expr Str Import alias Import alias Import alias Import alias Import alias Import alias Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListLoad Str Str Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Str body Assign NameStore AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str BinOpMod Str NameLoad orelse Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad BoolOpOr NameLoad NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BoolOpOr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpBitAnd NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpBitAnd BinOpRShift NameLoad Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpBitAnd BinOpRShift NameLoad Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpBitAnd BinOpRShift NameLoad Num Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str With Call NameLoad NameLoad Str NameStore body TryExcept body Assign NameStore Call NameLoad AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr attr handlers ExceptHandler type NameLoad body Assign NameStore Call NameLoad AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad BoolOpOr NameLoad NameLoad Str handlers ExceptHandler type NameLoad name NameStore body Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad BoolOpOr NameLoad NameLoad If NameLoad body Raise NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad NameLoad attr Str Return If CompareIs NameLoad NameLoad body Assign NameStore BinOpAdd NameLoad BoolOpOr BoolOpAnd NameLoad Str Str With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Slice Num Assign NameStore Num If CompareEq NameLoad ListLoad Str body While NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If UnaryOpNot NameLoad body Break Assign NameStore Call AttributeLoad NameLoad attr Str TryExcept body Expr Call NameLoad NameLoad keyword NameLoad handlers ExceptHandler type NameLoad name NameStore body Assign NameStore Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str AttributeLoad NameLoad attr ExceptHandler type NameLoad name NameStore body Assign NameStore Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad orelse For NameStore NameLoad body TryExcept body Expr Call NameLoad NameLoad keyword NameLoad handlers ExceptHandler type NameLoad name NameStore body Assign NameStore Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Return NameLoad decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr Call NameLoad
N/A N/A Routine to "compile" a .py file to a .pyc (or .pyo) file.

This module has intimate knowledge of the format of .pyc files.
 N/A __builtin__ N/A imp N/A marshal N/A os N/A sys N/A traceback N/A MAGIC N/A N/A imp get_magic N/A __all__ N/A compile main PyCompileError PyCompileError N/A Exception N/A N/A Exception raised when an error occurs while attempting to
    compile the file.

    To raise this exception, use

        raise PyCompileError(exc_type,exc_value,file[,msg])

    where

        exc_type:   exception type to be used in error message
                    type name can be accesses as class variable
                    'exc_type_name'

        exc_value:  exception value to be used in error message
                    can be accesses as class variable 'exc_value'

        file:       name of file being compiled to be used in error message
                    can be accesses as class variable 'file'

        msg:        string message to be written as error message
                    If no value is given, a default exception message will be given,
                    consistent with 'standard' py_compile output.
                    message (or default) can be accesses as class variable 'msg'

     __init__ N/A N/A self exc_type exc_value file msg N/A N/A N/A exc_type_name N/A exc_type __name__ N/A N/A exc_type SyntaxError N/A N/A tbtext N/A N/A join N/A N/A traceback format_exception_only exc_type exc_value N/A errmsg N/A N/A tbtext replace File "<string>" N/A File "%s" file N/A N/A errmsg N/A Sorry: %s: %s N/A exc_type_name exc_value N/A N/A N/A Exception __init__ self N/A msg errmsg exc_type_name exc_value file N/A N/A self exc_type_name exc_type_name N/A N/A self exc_value exc_value N/A N/A self file file N/A N/A self msg N/A msg errmsg N/A __str__ N/A N/A self N/A N/A N/A N/A self msg N/A N/A wr_long N/A N/A f x N/A N/A N/A Internal; write a 32-bit int to a file in little-endian order. N/A N/A N/A f write N/A chr N/A x 255 N/A N/A N/A f write N/A chr N/A N/A x 8 255 N/A N/A N/A f write N/A chr N/A N/A x 16 255 N/A N/A N/A f write N/A chr N/A N/A x 24 255 N/A compile N/A N/A file cfile dfile doraise N/A None None False N/A N/A Byte-compile one Python source file to Python bytecode.

    Arguments:

    file:    source filename
    cfile:   target filename; defaults to source with 'c' or 'o' appended
             ('c' normally, 'o' in optimizing mode, giving .pyc or .pyo)
    dfile:   purported filename; defaults to source (this is the filename
             that will show up in error messages)
    doraise: flag indicating whether or not an exception should be
             raised when a compile error is found. If an exception
             occurs and this flag is set to False, a string
             indicating the nature of the exception will be printed,
             and the function will return to the caller. If an
             exception occurs and this flag is set to True, a
             PyCompileError exception will be raised.

    Note that it isn't necessary to byte-compile Python modules for
    execution efficiency -- Python itself byte-compiles a module when
    it is loaded, and if it can, writes out the bytecode to the
    corresponding .pyc (or .pyo) file.

    However, if a Python installation is shared between users, it is a
    good idea to byte-compile all modules upon installation, since
    other users may not be able to write in the source directories,
    and thus they won't be able to write the .pyc/.pyo file, and then
    they would be byte-compiling every module each time it is loaded.
    This can slow down program start-up considerably.

    See compileall.py for a script/module that uses this module to
    byte-compile all installed files (or all files in selected
    directories).

     N/A N/A open file U f N/A N/A N/A N/A timestamp N/A long N/A N/A N/A os fstat N/A N/A f fileno st_mtime N/A N/A N/A AttributeError N/A N/A timestamp N/A long N/A N/A N/A os stat file st_mtime N/A codestring N/A N/A f read N/A N/A N/A codeobject N/A N/A __builtin__ compile codestring N/A dfile file exec N/A N/A N/A Exception N/A err N/A N/A py_exc N/A PyCompileError N/A err __class__ err N/A dfile file N/A doraise N/A N/A py_exc N/A N/A N/A N/A N/A sys stderr write N/A N/A py_exc msg N/A N/A N/A cfile None N/A N/A cfile N/A file N/A N/A __debug__ c o N/A N/A open cfile wb fc N/A N/A N/A N/A fc write N/A N/A wr_long fc timestamp N/A N/A N/A marshal dump codeobject fc N/A N/A N/A fc flush N/A N/A N/A fc seek 0 0 N/A N/A N/A fc write MAGIC N/A main N/A N/A args N/A None N/A N/A Compile several source files.

    The files named in 'args' (or on the command line, if 'args' is
    not specified) are compiled and the resulting bytecode is cached
    in the normal manner.  This function does not search a directory
    structure to locate source files; it only compiles files named
    explicitly.  If '-' is the only parameter in args, the list of
    files is taken from standard input.

     N/A N/A args None N/A N/A args N/A N/A sys argv N/A 1 N/A rv 0 N/A N/A args N/A - N/A N/A True N/A N/A filename N/A N/A N/A sys stdin readline N/A N/A filename N/A N/A N/A filename N/A N/A filename rstrip N/A N/A N/A N/A compile filename doraise True N/A N/A N/A PyCompileError N/A error N/A N/A rv 1 N/A N/A N/A N/A sys stderr write N/A %s
 N/A error msg N/A N/A IOError N/A error N/A N/A rv 1 N/A N/A N/A N/A sys stderr write N/A %s
 error N/A N/A filename args N/A N/A N/A N/A N/A compile filename doraise True N/A N/A N/A PyCompileError N/A error N/A N/A rv 1 N/A N/A N/A N/A sys stderr write N/A error msg N/A rv N/A N/A N/A __name__ __main__ N/A N/A N/A N/A sys exit N/A main