[C++-sig] Displaying PyErr_Print() error
s_sourceforge at nedprod.com
Thu Nov 27 20:05:53 CET 2003
-----BEGIN PGP SIGNED MESSAGE-----
On 27 Nov 2003 at 12:07, Paul Grenyer wrote:
> I originally asked this question some weeks ago, but didn't receive a
> reply. I've seen from googling that other people have had this
> problem, but I haven't seen a solution yet.
I remember us beginning to talk about this, and then going off on the
tangent of whether writing to stdout appears in idle or not.
> Am I doing something wrong? Is there another way to get the error
> generated by PyErr_Print() in a string?
I wouldn't take that approach. As it happens, very shortly I'll be
doing the same thing as you want to do for my own TnFOX library - I
can't see it being later than early next week, maybe even this
weekend. I was going to use the Python C API to interrogate the
exception object and from that build a custom FXException which is my
library's exception base class. That code should solve your problems.
Want me to get back to you when I'm done?
-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 220.127.116.11 / 9-2003 + PGP 8.0.2
-----END PGP SIGNATURE-----
More information about the Cplusplus-sig