2012-06-19 38 views

回答

9

您可以使用下面的函数来获取的版本信息:

Gtk.get_major_version() 
Gtk.get_minor_version() 
Gtk.get_micro_version() 
+0

谢谢,成功了! –

+1

链接到那些想知道的文档:https://developer.gnome.org/pygtk/stable/gtk-constants.html; https://developer.gnome.org/gtk3/stable/gtk3-Feature-Test-Macros.html – user3467349

0

对于.gir文件检查:

grep -rin 'get_[a-zA-Z]*_version' /usr/share/gir-1.0/Gtk-3.0.gir 

输出示例:

grep -rin 'get_[a-zA-Z]*_version' /usr/share/gir-1.0/Gtk-3.0.gir 
108409: <function name="get_major_version" 
108410:    c:identifier="gtk_get_major_version" 
108424: <function name="get_micro_version" 
108425:    c:identifier="gtk_get_micro_version" 
108439: <function name="get_minor_version" 
108440:    c:identifier="gtk_get_minor_version"