#include <pyInterpreter.h>
Public Types | |
Type definitions | |
| typedef std::vector< String > | PathStrings |
| Used to encode the individual paths appended to sys.path for dynamic loading of modules. | |
Static Public Member Functions | |
Initialization | |
| void | initialize () |
| Initialize the interpreter. | |
| void | finalize () |
| Stop the interpreter. | |
| bool | isInitialized () |
| Determine the interpreter state. | |
| void | setSysPath (const PathStrings &path_strings) |
| Append additional search paths to sys.path upon initialization. | |
| const PathStrings & | getSysPath () |
| Get the current paths added to sys.path. | |
| bool | isValid () |
| String | getStartupLog () |
Execution | |
| String | run (const String &s, bool &result) |
| Execute a string. | |
| String | runFile (const String &filename) throw (Exception::FileNotFound) |
| Run a Python program from a file. | |
| bool | importModule (const String &module_name) |
| Import a module. | |
Static Protected Attributes | |
| PathStrings | sys_path_ |
| bool | valid_ |
| String | start_log_ |
There's just one global instance of the interpreter, so all methods are static. The use of subinterpreters is not yet supported.
|
|
Stop the interpreter.
Deallocate all memory occupied by the interpreter (by calling |
|
|
Import a module.
The module with name
|
|
|
|
Determine the interpreter state.
|
|
||||||||||||
|
Execute a string.
|
|
|
Run a Python program from a file.
|