SCIRun  5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
PythonInterpreter Class Reference

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
 

Detailed Description

A wrapper class of the python interpreter.

It calls the python interpreter on a separate thread.

Member Typedef Documentation

typedef boost::signals2::signal< void ( const std::string& ) > console_output_signal_type

Member Function Documentation

std::string EscapeSingleQuotedString ( const std::string &  input_str)
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.

Friends And Related Function Documentation

friend class ::PythonStdIO
friend

Member Data Documentation


The documentation for this class was generated from the following files: