module documentation
Functions for generating, reading and parsing pyc.
Class |
|
Visitor for changing co_filename in a code object. |
Function | compile |
Compile a string to pyc, and then load and parse the pyc. |
Function | parse |
Parse pyc data from a file. |
Function | parse |
Parse pyc data from a string. |
Function | visit |
Recursively process constants in a pyc using a visitor. |
Constant | _VISIT |
Undocumented |
Compile a string to pyc, and then load and parse the pyc. Args: src: Python source code. filename: The filename the sourcecode is from. python_version: Python version, (major, minor). python_exe: The path to Python interpreter. mode: "exec", "eval" or "single". Returns: An instance of loadmarshal.CodeType. Raises: UsageError: If python_exe and python_version are mismatched.
Parse pyc data from a file. Args: fi: A file-like object. Returns: An instance of loadmarshal.CodeType. Raises: IOError: If we can't read the file or the file is malformed.