SCIRun
5.0
|
A wrapper class of the python interpreter. More...
#include <PythonInterpreter.h>
Public Types | |
typedef boost::signals2::signal< void(const std::string &) > | console_output_signal_type |
Public Member Functions | |
void | print_banner () |
Print the basic information about the python interpreter to output_signal_. More... | |
void | run_string (const std::string &command) |
void | run_script (const std::string &script) |
void | run_file (const std::string &file_name) |
void | interrupt () |
Interrupt the current execution. More... | |
void | start_terminal () |
To be implemented. More... | |
Static Public Member Functions | |
static std::string | EscapeSingleQuotedString (const std::string &input_str) |
Public Attributes | |
console_output_signal_type | prompt_signal_ |
console_output_signal_type | error_signal_ |
console_output_signal_type | output_signal_ |
Friends | |
class | ::PythonStdIO |
A wrapper class of the python interpreter.
It calls the python interpreter on a separate thread.
typedef boost::signals2::signal< void ( const std::string& ) > console_output_signal_type |
|
static |
Escape the quotes(') and backslashes() in a string so it can be used as a python string enclosed by a pair of single quotes.
void interrupt | ( | ) |
Interrupt the current execution.
void print_banner | ( | ) |
Print the basic information about the python interpreter to output_signal_.
void run_file | ( | const std::string & | file_name | ) |
Execute a python script from file. NOTE: The script is run in its own local namespace.
void run_script | ( | const std::string & | script | ) |
Execute a python script. NOTE: The script is run in its own local namespace.
void run_string | ( | const std::string & | command | ) |
Execute a single python command. NOTE: The command is run in the main namespace.
void start_terminal | ( | ) |
To be implemented.
|
friend |
console_output_signal_type error_signal_ |
console_output_signal_type output_signal_ |
console_output_signal_type prompt_signal_ |