On Mon, Jan 30, 2006 at 07:38:58PM -0200, Johan Dahlin wrote:
> Andrew Reid wrote:
> > [snippage]
> >> if (args) {
> >> // Call the Python handler for the configuration event...
> >> PyObject *result = PyObject_CallObject(config_callback, args);
> >> if (result==NULL) {
> >> if (PyGtk_FatalExceptions) { // <--- ERROR CHECK IS HERE
>
> Just calling if (PyErr_Occurred()) should be fine here.
But it's inside the "if (result==NULL)" -- doesn't that mean
that a Python error has certainly occurred? My understanding of
the previous code was that it distinguished between fatal-to-pygtk
exceptions and more benign "ordinary" exceptions in the Python
callback code.
My recollection of the old code is imperfect, though, and I
certainly welcome clarification. I guess it's two questions,
what did the old PyGtk_FatalExceptions flag really indicate,
and is there a pygtk2 equivalent?
-- A.
--
Dr. Andrew C. E. Reid, Guest Researcher
Center for Theoretical and Computational Materials Science
National Institute of Standards and Technology, Mail Stop 8500
Gaithersburg MD 20899 USA
[EMAIL PROTECTED]
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/