1 #include "PythonConsole_PyConsole.h"
2 #include "PythonConsole_PyEditor.h"
3 #include "PyInterp_base.h"
5 #include "SUIT_Desktop.h"
11 //****************************************************************
12 PythonConsole::PythonConsole(QWidget* parent, PyInterp_base* interp)
13 : QWidget(parent), myEditor( 0 )
15 // create python interpreter
18 myInterp = new PythonConsole_PyInterp();
20 // initialize Python interpretator
21 myInterp->initialize();
23 // create editor console
24 QVBoxLayout* lay = new QVBoxLayout( this );
25 myEditor = new PythonConsole_PyEditor(myInterp, this,"Python Interpreter");
26 lay->addWidget( myEditor );
29 //****************************************************************
30 PythonConsole::~PythonConsole()
34 //****************************************************************
35 void PythonConsole::exec( const QString& command )
38 myEditor->exec( command );