コード例 #1
0
 /**
  * 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);
 }
コード例 #2
0
 /**
  * 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);
 }