casa
$Rev:20696$
|
Class that grabs a handle onto the currently running casapy Python interpreter shell. More...
#include <CasaPyInterpreter.h>
Public Member Functions | |
CasaPyInterpreter (Bool usegui=True) | |
Default Constructor. | |
CasaPyInterpreter (CasaPyInterpreter const &) | |
Copy Constructor. | |
CasaPyInterpreter & | operator= (CasaPyInterpreter const &) |
Assignment. | |
~CasaPyInterpreter () | |
Destructor. | |
void | pyrunString (String cmd) |
Send in a python command string. | |
void | CheckPlotError (String cmd) |
Periodically check if the internal interpreter has thrown an exception. | |
void | setupCustomGuiFeatures () |
Add Gui buttons and bind them. | |
Private Member Functions | |
void | CasaPyInterpreterError (String msg) |
Exception generator. | |
Private Attributes | |
PyObject * | interp |
Handle to the internal python interpreter. | |
SLog * | log |
Static Private Attributes | |
static String | clname |
Class that grabs a handle onto the currently running casapy Python interpreter shell.
A link between Casa and a Python-Interpreter.
This class creates and maintains a link between C++ and the current instance of the python interpreter. ( Wes Young wrote the first part of the constructor, that creates a local python interpreter, and loads "pylab" into it. )
All python commands that TPPlotter runs, are sent into this class for transmission to the python interpreter.
To isolate the process of connecting between C++ and Python.
Definition at line 95 of file CasaPyInterpreter.h.
casa::CasaPyInterpreter::CasaPyInterpreter | ( | CasaPyInterpreter const & | ) |
Copy Constructor.
casa::CasaPyInterpreter::~CasaPyInterpreter | ( | ) |
Destructor.
void casa::CasaPyInterpreter::CasaPyInterpreterError | ( | String | msg | ) | [private] |
Exception generator.
void casa::CasaPyInterpreter::CheckPlotError | ( | String | cmd | ) |
Periodically check if the internal interpreter has thrown an exception.
If so, grab the message and create an AipsError exception.
CasaPyInterpreter& casa::CasaPyInterpreter::operator= | ( | CasaPyInterpreter const & | ) |
Assignment.
void casa::CasaPyInterpreter::pyrunString | ( | String | cmd | ) |
Send in a python command string.
Be very wary of newlines and blank spaces
void casa::CasaPyInterpreter::setupCustomGuiFeatures | ( | ) |
Add Gui buttons and bind them.
Usually called immediately after construction, and only once.
String casa::CasaPyInterpreter::clname [static, private] |
Definition at line 127 of file CasaPyInterpreter.h.
PyObject* casa::CasaPyInterpreter::interp [private] |
Handle to the internal python interpreter.
Definition at line 124 of file CasaPyInterpreter.h.
SLog* casa::CasaPyInterpreter::log [private] |
Definition at line 126 of file CasaPyInterpreter.h.