Re: [pygtk] try/except won't trap DeprecationWarning from OptionMenu

2009-01-21 Thread Paul Pogonyshev
Alessandro Dentella wrote:
>   I'd like to use deprecated OptionMenu, but I can't stop the
>   DeprecationWarning. Why is it different from a self produced one?

It is not different.  Please see the 'warnings' module.  Last time I
checked the warnings filters described there could be used to suppress
warnings from PyGTK as well.

Paul

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] try/except won't trap DeprecationWarning from OptionMenu

2009-01-21 Thread Alessandro Dentella
Hi,

  I'd like to use deprecated OptionMenu, but I can't stop the
  DeprecationWarning. Why is it different from a self produced one?

import gtk

try:
raise DeprecationWarning
except DeprecationWarning, e:
pass


try:
a = gtk.OptionMenu()
except DeprecationWarning, e:
pass

  
  only the first one will be trapped. Why?
  Is there a way to stop it?



  sandro
  *:-)


PS: the reason why I want to use OptionMenu is as per my other thread the
possibilityto add tooltips
  
-- 
Sandro Dentella  *:-)
http://sqlkit.argolinux.orgSQLkit home page - PyGTK/python/sqlalchemy
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/