Name

exec

Synopsis

void interp.exec(String s)
void interp.exec(PyObject code)

Executes, in interp’s namespace, the Python statements held in Java string s or in compiled PyObject code (produced by function __builtin__.compile of package org.python.core, covered later in this chapter).

Get Python in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.