Python class for redirection of stdout to FreeCAD's Python console window. More...
#include <PythonConsolePy.h>
Public Member Functions | |
Py::Object | flush (const Py::Tuple &) |
PythonStdout (PythonConsole *pc) | |
Py::Object | repr () |
Py::Object | write (const Py::Tuple &) |
~PythonStdout () | |
Static Public Member Functions | |
static void | init_type (void) |
Python class for redirection of stdout to FreeCAD's Python console window.
This allows to show all Python messages in the same window where the commands are performed.
Definition at line 41 of file PythonConsolePy.h.
PythonStdout::PythonStdout | ( | PythonConsole * | pc | ) |
Definition at line 50 of file PythonConsolePy.cpp.
PythonStdout::~PythonStdout | ( | ) |
Definition at line 55 of file PythonConsolePy.cpp.
Py::Object PythonStdout::flush | ( | const Py::Tuple & | ) |
Definition at line 95 of file PythonConsolePy.cpp.
References Sketcher::None.
Referenced by init_type().
void PythonStdout::init_type | ( | void | ) | [static] |
Definition at line 40 of file PythonConsolePy.cpp.
References Py::PythonExtension< PythonStdout >::add_varargs_method(), Py::PythonExtension< PythonStdout >::behaviors(), flush(), and write().
Referenced by Gui::Application::Application().
Py::Object PythonStdout::repr | ( | ) | [virtual] |
Reimplemented from Py::PythonExtensionBase.
Definition at line 59 of file PythonConsolePy.cpp.
Py::Object PythonStdout::write | ( | const Py::Tuple & | args | ) |
Definition at line 67 of file PythonConsolePy.cpp.
References Py::Exception::clear(), Sketcher::None, Py::Object::ptr(), and Py::String::size().
Referenced by init_type().