/** * Execute a Python code object in the local namespace * * @param code the code object to execute */ public void exec(PyObject code) { setState(); Py.exec(code, locals, locals); }
/** * Execute a string of Python source in the local namespace * * @param s the string to execute */ public void exec(String s) { setState(); Py.exec(Py.compile_flags(s, "<string>", "exec", cflags), locals, locals); }