|
ecto
|
Classes | |
| class | gil |
| struct | gilstatus |
| struct | istream |
| class | nothing_to_lock |
| struct | ostream |
| class | scoped_call_back_to_python |
| class | scoped_gil_release |
| class | streambuf |
| struct | streambuf_capsule |
Functions | |
| std::string | file_and_line_as_string (const char *file, long line) |
| A stream buffer getting data from and putting data into a Python file object. More... | |
| std::string | repr (const boost::python::object &obj) |
| void | postregistration (const std::string &, const std::string &, const std::string &) |
|
inline |
A stream buffer getting data from and putting data into a Python file object.
The aims are as follow:
and given a piece of Python code which creates a file-like object, to be able to pass this file object to that C++ function, e.g.
and have the standard stream pull data from and put data into the Python file object.
read_inputs() returns, the Python object is able to continue reading or writing where the C++ code left off.std::fstream.Motivation
Usage
This is 2-step:
which has to be written every time one wants a Python binding for such a C++ function.
buffer_size is optional. See also: default_buffer_size
Note: references are to the C++ standard (the numbers between parentheses at the end of references are margin markers).
| void ecto::py::postregistration | ( | const std::string & | , |
| const std::string & | , | ||
| const std::string & | |||
| ) |
| std::string ecto::py::repr | ( | const boost::python::object & | obj | ) |
1.8.11