static class which implements a new python type. The members cout and cerr of the python system are set to variables of this type PyStream in order to observe the python's cout and cerr stream and to transmit the stream's content to the main application.
More...
static class which implements a new python type. The members cout and cerr of the python system are set to variables of this type PyStream in order to observe the python's cout and cerr stream and to transmit the stream's content to the main application.
PyObject * ito::PyStream::PythonStream_flush |
( |
PythonStream * |
self, |
|
|
PyObject * |
args |
|
) |
| |
|
static |
static method is invoked if stream has been flushed
stream is flushed if python is destroyed. Must return Py_None.
- Returns
- PyNone
PyObject * ito::PyStream::PythonStream_write |
( |
PythonStream * |
self, |
|
|
PyObject * |
args |
|
) |
| |
|
static |
static method invoked if string has been written to stream
string is contained in args reference and then sent to std::cout or std::cerr-stream, depending on value of member type.
- Returns
- PyNone
PyMemberDef ito::PyStream::PythonStream_members |
|
static |
Initial value:= {
{"type", T_INT, offsetof(PyStream::PythonStream, type), READONLY, "PythonStream type"},
{"encoding", T_OBJECT_EX, offsetof(PyStream::PythonStream, encoding), READONLY, "Encoding of stream"},
{"closed", T_BOOL, offsetof(PyStream::PythonStream, closed), READONLY, "Indicates if stream is closed"},
{NULL}
}
static PyMemberDef table which describes every member of PyStream type
PyMethodDef ito::PyStream::PythonStream_methods |
|
static |
Initial value:= {
{ "readline", (PyCFunction)PyStream::PythonStream_readline, METH_VARARGS, "readline function" },
{"fileno", (PyCFunction)PyStream::PythonStream_fileno, METH_NOARGS, "returns the virtual file number of this stream (0: in [not supported yet], 1: out, 2: err, 3: in)"},
{NULL}
}
static table of type PyMethodDef which contains function pointers and descriptions to all methods, belonging to this type
PyModuleDef ito::PyStream::pythonStreamModule |
|
static |
Initial value:= {
PyModuleDef_HEAD_INIT,
"pythonStream",
"Example module that creates an extension type.",
-1,
NULL, NULL, NULL, NULL, NULL
}
PyModuleDef table, containing description for PyStream type.
The documentation for this class was generated from the following files:
- D:/itom/sources/itom/Qitom/python/pythonStream.h
- D:/itom/sources/itom/Qitom/python/pythonStream.cpp