Reference¶
-
class
codemach.Machine(verbose=False, callbacks={})[source]¶ Class that executes python code objects.
Parameters: verbose – verbosity level -
build_class(callable_, args)[source]¶ Implement
builtins.__build_class__. We must wrap all class member functions usingfunction_wrapper(). This requires using aMachineto execute the class source code and then recreating the class source code using anAssembler.
-
call_function(i)[source]¶ Implement the CALL_FUNCTION operation.
-
exec(code, globals_=None, _locals=None)[source]¶ Execute a code object
The inputs and behavior of this function should match those of eval and exec.
Note
Need to figure out how the internals of this function must change for
evalorexec.Parameters: - code – a python code object
- globals – optional globals dictionary
- _locals – optional locals dictionary
-