From: gdd Date: Mon, 17 Oct 2011 08:53:51 +0000 (+0000) Subject: Added possibility to set the Python console synchronous by setting the environment... X-Git-Tag: V6_4_0a1~23 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ae3fcf4c6e9921dfecb061e58bfebf10d9640510;p=modules%2Fgui.git Added possibility to set the Python console synchronous by setting the environment variable PYTHON_CONSOLE_SYNC at runtime. --- diff --git a/src/PyConsole/PyConsole_Console.cxx b/src/PyConsole/PyConsole_Console.cxx index d8fdf13f5..afba1a711 100644 --- a/src/PyConsole/PyConsole_Console.cxx +++ b/src/PyConsole/PyConsole_Console.cxx @@ -41,6 +41,8 @@ #include #include +#include + /*! \brief Constructor. @@ -64,6 +66,12 @@ PyConsole_Console::PyConsole_Console( QWidget* parent, PyConsole_Interp* interp QVBoxLayout* lay = new QVBoxLayout( this ); lay->setMargin( 0 ); myEditor = new PyConsole_Editor( myInterp, this ); + char* synchronous = getenv("PYTHON_CONSOLE_SYNC"); + if (synchronous && atoi(synchronous)) + { + MESSAGE("Python console is synchronous"); + myEditor->setIsSync(true); + } myEditor->viewport()->installEventFilter( this ); lay->addWidget( myEditor );