Boost logo

Boost Users :

From: Neal Becker (ndbecker2_at_[hidden])
Date: 2008-03-07 13:17:23


Robert Dailey wrote:

> Hi,
>
> Right now when an exception occurs in boost.python, I simply call
> PyErr_Print() to print the message to a console window. However, I would
> like to be able to have the option of redirecting the output of
> PyErr_Print() to a string, file, or any other ostream interface compatible
> object I choose. Is there an easy way to do this (possibly using boost)?
> My searching on the internet has not really shown any useful results. The
> answers I've seen involve creating pipes, which I don't want to do because
> it is non trivial. I was hoping boost could shine in this area since it
> seems to be a common issue.

Why don't you redirect sys.stderr from python?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net