[IPython-user] sys.stderr

Fernando Perez fperez.net@gmail....
Wed Sep 3 19:33:22 CDT 2008


On Wed, Sep 3, 2008 at 9:33 AM, JM Seitz <jms@bughunter.ca> wrote:
> So (as I mentioned in my previous post) I have IPython embedded into a
> C++ app. That's working fine now, however, I need to be able to access
> sys.stderr but instead of the original traceback that Python itself has
> thrown I can only get:
> ERROR - failed to write data to
> stream:<pyreadline.console.console.Console object at 0x036B6A70>
> So I am getting the exception that the IPython shell was handed but I
> need to get the original sys.stderr exception. The shell is an
> iplib.InteractiveShell instance.

I'm afraid I have no embedding (in C++) experience so I won't be able
to help you out, but it would really be great if you could document
this process so we could include it in the ipython docs and examples
for the future.  This question does come up somewhat regularly...



More information about the IPython-user mailing list