A Qui, 2004-06-17 às 16:52, John Ehresman escreveu: > Gustavo J. A. M. Carneiro wrote: > > 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. > > Interesting idea; I think this should be an option and maybe should be > the default behavior. The patch I submitted as part of the patch to > create a glib module simply wraps the log_set_handler function so that a > Python callable can be used as the handler.
Right. I was not thinking it even as option. PyGTK would _always_ install a log handler, at startup, that would capture all warning messages and inject them into python's warning module. Then, if the programmer wants to intercept warnings, he would use the standard python API. I think that this way GTK blends better with Python, and the programmer doesn't have to learn two logging APIs. Regards. -- Gustavo João Alves Marques Carneiro <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> The universe is always one step beyond logic. _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/