From 6a18530a8dc95153e23d9a984098a832c4289096 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 29 Aug 2015 17:22:40 +0200 Subject: [PATCH] + if FreeCAD is not running in Gui mode do not replace Python std. output --- src/Main/MainGui.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Main/MainGui.cpp b/src/Main/MainGui.cpp index 3a581dc01..a598a6ea6 100644 --- a/src/Main/MainGui.cpp +++ b/src/Main/MainGui.cpp @@ -168,7 +168,10 @@ int main( int argc, char ** argv ) } Gui::Application::initApplication(); - Base::Interpreter().replaceStdOutput(); + + // Only if 'RunMode' is set to 'Gui' do the replacement + if (App::Application::Config()["RunMode"] == "Gui") + Base::Interpreter().replaceStdOutput(); } catch (const Base::UnknownProgramOption& e) { QApplication app(argc,argv);