meta.decompile - decompile code objects into ast nodes¶
Decompiler module.
This module can decompile arbitrary code objects into a python ast.
- meta.decompiler.decompile_func(func)[source]¶
Decompile a function into ast.FunctionDef node.
Parameters: func – python function (can not be a built-in) Returns: ast.FunctionDef instance.
- meta.decompiler.compile_func(ast_node, filename, globals, **defaults)[source]¶
Compile a function from an ast.FunctionDef instance.
Parameters: - ast_node – ast.FunctionDef instance
- filename – path where function source can be found.
- globals – will be used as func_globals
Returns: A python function object