[pygtk] g_log_set_handler?

Gustavo J. A. M. Carneiro gjc at inescporto.pt
Thu Jun 17 18:41:40 WST 2004


A Qua, 2004-06-16 às 23:32, Tim Newsham escreveu:
> Hi,  Is there any way to set the log handler in pygtk?  I couldn't
> find any.  I did notice a previous related thread on
> "turning tk warnings into exceptions."   I am interested
> in altering the default warning logging mechanism.  Currently
> under windows it forces a console window to open up to
> emit these warnings.  I know that ideally the code would
> be warning free, but I still get occasional harmless warnings
> from gtk and glade.

  I think pygtk should install a log handler to turn all log messages
into python warnings.  Then, the pygtk programmer may use the standard
'warnings' module to do whatever he wishes to such warnings: hide them,
turn them to exceptions, show in a text/list widget, etc.

  If you are interested in this, you should open a bug report in
bugzilla.gnome.org, product pygtk, type enhancement.  A patch will speed
up the bug progress, but otherwise I will eventually do this, but it may
take some time.

  Regards.

-- 
Gustavo João Alves Marques Carneiro
<gjc at inescporto.pt> <gustavo at users.sourceforge.net>
The universe is always one step beyond logic.



More information about the pygtk mailing list