"""Package for parsing and compiling Python source code There are several functions defined at the top level that are imported from modules contained in the package. parse(buf, mode="exec") -> AST Converts a string containing Python source code to an abstract syntax tree (AST). The AST is defined in compiler.ast. parseFile(path) -> AST The same as parse(open(path)) walk(ast, visitor, verbose=None) Does a pre-order walk over the ast using the visitor instance. See compiler.visitor for details. compile(source, filename, mode, flags=None, dont_inherit=None) Returns a code object. A replacement for the builtin compile() function. compileFile(filename) Generates a .pyc file by compiling filename. """ import warnings warnings.warn("The compiler package is deprecated and removed in Python 3.x.", DeprecationWarning, stacklevel=2) from compiler.transformer import parse, parseFile from compiler.visitor import walk from compiler.pycodegen import compile, compileFile
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
__init__.py | File | 1023 B | 0644 |
|
__init__.pyc | File | 1.26 KB | 0644 |
|
ast.py | File | 36.63 KB | 0644 |
|
ast.pyc | File | 69.67 KB | 0644 |
|
consts.py | File | 468 B | 0644 |
|
consts.pyc | File | 735 B | 0644 |
|
future.py | File | 1.85 KB | 0644 |
|
future.pyc | File | 2.87 KB | 0644 |
|
misc.py | File | 1.75 KB | 0644 |
|
misc.pyc | File | 3.61 KB | 0644 |
|
pyassem.py | File | 23.7 KB | 0644 |
|
pyassem.pyc | File | 25.19 KB | 0644 |
|
pycodegen.py | File | 46.69 KB | 0644 |
|
pycodegen.pyc | File | 54.85 KB | 0644 |
|
symbols.py | File | 14.15 KB | 0644 |
|
symbols.pyc | File | 17.15 KB | 0644 |
|
syntax.py | File | 1.41 KB | 0644 |
|
syntax.pyc | File | 1.83 KB | 0644 |
|
transformer.py | File | 51.87 KB | 0644 |
|
transformer.pyc | File | 46.28 KB | 0644 |
|
visitor.py | File | 3.8 KB | 0644 |
|
visitor.pyc | File | 4.07 KB | 0644 |
|