About PyGtk
*FAQ about PyGtk
http://www.async.com.br/faq/pygtk/
B) Very useful
*Gtk+ and PyGtk (Japanese)
http://isweb23.infoseek.co.jp/computer/paison/paison/gtk/
:) useful
*PyGtk document
http://www.gnome.org/~james/pygtk-docs/
X-( Some wrong descriptions are included, please be careful
Q&A
How do I get avtive status of "GtkCheckMenu?" ?
GtkCheckMenu? and its super classes don¡Çt have get_active() method.
See following example for getting active status of GtkCheckMenu?.
http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq11.003.htp
<!> I can get active status, but cannot set value to "active" attribute directly.
Here is bad example, {{{import gtkaCheckMenu = GtkCheckMenu?("test_title") aCheckMenu.active = gtk.TRUE
}}} But I can set it by set_active() method. {{{import gtk
aCheckMenu = GtkCheckMenu?("test_title") aCheckMenu.set_active(gtk.TRUE)
}}}
How do I create abstract method ?
Following example detect "not implemented error".
{{{e.g.
def method( self ):
import inspect caller = inspect.getouterframes(inspect.currentframe())[0][3] raise NotImplementedError?(caller + 'must be implemented in subclass')
# end of method
}}}
<!> You know, this exception will be raised when those lines are called at first under running program. This sample coding cannot find ¡È not implemented error¡É statically.
How do I get the traceback of exception as list?
Following example gets the traceback of exception as list. {{{e.g.
import sys import traceback try:
x=(1,2,3) print x[3]
except:
aErrorMessageList = traceback.format_exception(sys.exc_type,sys.exc_value,sys.exc_traceback) for aLine in aErrorMessageList:
print aLine
}}}
How do I get selected CList ?
<!> Do not use the list that is given when the event of 'row_select' happens. That includes some bugs[[BR]] see http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq13.003.htp
