Commit 2d877a21 authored by Jan Möbius's avatar Jan Möbius

Try to redirect python output only when we are in gui mode. Otherwise just leave it on the console

parent b5b9347c
...@@ -140,9 +140,13 @@ void PythonInterpreter::initPython() { ...@@ -140,9 +140,13 @@ void PythonInterpreter::initPython() {
std::cerr << "Redirect Outputs ..."; std::cerr << "Redirect Outputs ...";
#endif #endif
// Redirect python output to integrated logger functions // Redirect python output to integrated logger functions
tyti::pylog::redirect_stderr([this](const char*w) {this->pyError(w); }); // Try to redirect python output only when we are in gui mode. Otherwise just leave it on the console
tyti::pylog::redirect_stdout([this](const char* w) {this->pyOutput(w); }); if ( OpenFlipper::Options::gui() ) {
tyti::pylog::redirect_stderr([this](const char*w) {this->pyError(w); });
tyti::pylog::redirect_stdout([this](const char* w) {this->pyOutput(w); });
}
#ifdef PYTHON_DEBUG #ifdef PYTHON_DEBUG
std::cerr << " Done" << std::endl; std::cerr << " Done" << std::endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment