OpenStructure
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
PythonInterpreter Class Reference

#include <python_interpreter.hh>

Inherits QObject.

Public Slots

unsigned int RunScript (const QString &script)
 
unsigned int RunCommand (const QString &command)
 

Signals

void Output (unsigned int id, const QString &output)
 
void ErrorOutput (unsigned int id, const QString &output)
 
void Finished (unsigned int id, bool error_state)
 
void Exit ()
 
void WakeWorker ()
 

Public Member Functions

 ~PythonInterpreter ()
 
bool IsRunning ()
 
void AppendModulePath (const QString &entry)
 
void AppendCommandlineArgument (const QString &arg)
 
bp::dict GetMainNamespace () const
 
bp::object GetMainModule () const
 
CodeBlockStatus GetCodeBlockStatus (const QString &command)
 
void Stop ()
 
void Start ()
 
void StopScript ()
 

Static Public Member Functions

static PythonInterpreterInstance ()
 

Protected Member Functions

 PythonInterpreter ()
 

Protected Attributes

bp::object main_module_
 
bp::dict main_namespace_
 
bool running_
 
bp::object compile_command_
 
PythonInterpreterWorker worker_
 

Detailed Description

Definition at line 54 of file python_interpreter.hh.

Constructor & Destructor Documentation

◆ ~PythonInterpreter()

◆ PythonInterpreter()

PythonInterpreter ( )
protected

Member Function Documentation

◆ AppendCommandlineArgument()

void AppendCommandlineArgument ( const QString &  arg)

◆ AppendModulePath()

void AppendModulePath ( const QString &  entry)

◆ ErrorOutput

void ErrorOutput ( unsigned int  id,
const QString &  output 
)
signal

◆ Exit

void Exit ( )
signal

◆ Finished

void Finished ( unsigned int  id,
bool  error_state 
)
signal

◆ GetCodeBlockStatus()

CodeBlockStatus GetCodeBlockStatus ( const QString &  command)

Get code block status.

Determines whether the command contains errors, is incomplete or ready to be run.

◆ GetMainModule()

bp::object GetMainModule ( ) const

◆ GetMainNamespace()

bp::dict GetMainNamespace ( ) const

◆ Instance()

static PythonInterpreter& Instance ( )
static

◆ IsRunning()

bool IsRunning ( )

◆ Output

void Output ( unsigned int  id,
const QString &  output 
)
signal

◆ RunCommand

unsigned int RunCommand ( const QString &  command)
slot

◆ RunScript

unsigned int RunScript ( const QString &  script)
slot

execute python command

◆ Start()

void Start ( )

start/continue execution of Python commands

See also
Stop

◆ Stop()

void Stop ( )

stop execution of Python commands

See also
Start

◆ StopScript()

void StopScript ( )

stop script execution

◆ WakeWorker

void WakeWorker ( )
signal

Field Documentation

◆ compile_command_

bp::object compile_command_
protected

Definition at line 102 of file python_interpreter.hh.

◆ main_module_

bp::object main_module_
protected

Definition at line 99 of file python_interpreter.hh.

◆ main_namespace_

bp::dict main_namespace_
protected

Definition at line 100 of file python_interpreter.hh.

◆ running_

bool running_
protected

Definition at line 101 of file python_interpreter.hh.

◆ worker_

PythonInterpreterWorker worker_
protected

Definition at line 103 of file python_interpreter.hh.


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