diff --git a/MantidPlot/src/PythonScript.h b/MantidPlot/src/PythonScript.h index 88e8a936f5759b5ab68177a32d99516ad34524f9..8575c2d54f32be4909e4e94b56a2b5f66f5d7252 100644 --- a/MantidPlot/src/PythonScript.h +++ b/MantidPlot/src/PythonScript.h @@ -66,8 +66,10 @@ public: // -------------------------- Print/error message handling ------------------ /// Connects the python stdout to a Qt signal inline void write(const QString &text) { emit print(text); } - /// 'Fake' method needed for IPython import + /// Simulate file-like object (required for IPython) inline void flush() {} + /// Simulate file-like object (required for colorama) + inline bool closed() { return false; } /// Is the given code complete bool compilesToCompleteStatement(const QString & code) const; diff --git a/MantidPlot/src/PythonScripting.h b/MantidPlot/src/PythonScripting.h index f34b0ae5c5f77d31dba99f367870135f97d00c4f..cd6b6aae697619e74504251d08748ff69a17c67c 100644 --- a/MantidPlot/src/PythonScripting.h +++ b/MantidPlot/src/PythonScripting.h @@ -52,8 +52,10 @@ public: ~PythonScripting(); /// Write text to std out void write(const QString &text) { emit print(text); } - /// 'Fake' method needed for IPython import - void flush() {} + /// Simulate file-like object (required for IPython) + inline void flush() {} + /// Simulate file-like object (required for colorama) + inline bool closed() { return false; } /// 'Fake' method needed for IPython import void set_parent(PyObject*) {} diff --git a/MantidPlot/src/qti.sip b/MantidPlot/src/qti.sip index 1ce385f18b47a37b0f2cb2843f510f72afb8672d..3443b9e57cbeb67fbd0b98b9815357ce80cbaf52 100644 --- a/MantidPlot/src/qti.sip +++ b/MantidPlot/src/qti.sip @@ -1287,8 +1287,10 @@ class PythonScripting %End public: void write(const QString&); - // 'Fake' methods needed for IPython import + // Simulate file-like object (required for IPython) void flush(); + // Simulate file-like object (required for colorama) + bool closed(); void set_parent(SIP_PYOBJECT); private: PythonScripting(const PythonScripting&); @@ -1300,8 +1302,10 @@ class PythonScript %End public: void write(const QString&); - // 'Fake' method needed for IPython import + // Simulate file-like object (required for IPython) void flush(); + // Simulate file-like object (required for colorama) + bool closed(); // Line number trace void lineNumberChanged(SIP_PYOBJECT,int); private: