From ae3fcf4c6e9921dfecb061e58bfebf10d9640510 Mon Sep 17 00:00:00 2001 From: gdd Date: Mon, 17 Oct 2011 08:53:51 +0000 Subject: [PATCH] Added possibility to set the Python console synchronous by setting the environment variable PYTHON_CONSOLE_SYNC at runtime. --- src/PyConsole/PyConsole_Console.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) 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 ); -- 2.39.2