]> git.proxmox.com Git - mirror_edk2.git/blame - AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/__init__.py
EmbeddedPkg: Extend NvVarStoreFormattedLib LIBRARY_CLASS
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / compiler / __init__.py
CommitLineData
4710c53d 1"""Package for parsing and compiling Python source code\r
2\r
3There are several functions defined at the top level that are imported\r
4from modules contained in the package.\r
5\r
6parse(buf, mode="exec") -> AST\r
7 Converts a string containing Python source code to an abstract\r
8 syntax tree (AST). The AST is defined in compiler.ast.\r
9\r
10parseFile(path) -> AST\r
11 The same as parse(open(path))\r
12\r
13walk(ast, visitor, verbose=None)\r
14 Does a pre-order walk over the ast using the visitor instance.\r
15 See compiler.visitor for details.\r
16\r
17compile(source, filename, mode, flags=None, dont_inherit=None)\r
18 Returns a code object. A replacement for the builtin compile() function.\r
19\r
20compileFile(filename)\r
21 Generates a .pyc file by compiling filename.\r
22"""\r
23\r
24import warnings\r
25\r
26warnings.warn("The compiler package is deprecated and removed in Python 3.x.",\r
27 DeprecationWarning, stacklevel=2)\r
28\r
29from compiler.transformer import parse, parseFile\r
30from compiler.visitor import walk\r
31from compiler.pycodegen import compile, compileFile\r