Nebula
|
Namespaces | |
namespace | detail |
Functions | |
template<typename T > | |
void | redirect_stdout (T t) |
redirects sys.stdout | |
template<typename T > | |
void | redirect_stderr (T t) |
|
inline |
|
inline |
redirects sys.stdout
Whenever sys.stdout.write is called, call the given function instead. Given function has to be the signature "void (const char*)"
Preconditions: Python has to be initialized. Calling thread has to hold the GIL. (in case of multi threading)
Exceptions: Maybe a PyErr occurs. This must be handled by the user.
t | callbacl function of type "void (const char*)" |