[pygtk] Checking version of PyGTK from withing Python
David Ripton
dripton at ripton.net
Tue May 20 04:20:23 WST 2008
On 2008.05.19 11:34:27 -0700, Mitko Haralanov wrote:
> Is there a way to check the version of PyGTK from within my Python
> program?
>
> I know of pygtk.require() but that returns False for anything higher
> then 2.0, even though I have pygtk-2.12 installed.
$ python
>>> import gtk
>>> [x for x in dir(gtk) if "ver" in x]
['check_version', 'gtk_version', 'pygtk_version', 'ver']
>>> gtk.gtk_version
(2, 10, 4)
>>> gtk.pygtk_version
(2, 10, 1)
>>> gtk.ver
(2, 12, 1)
--
David Ripton dripton at ripton.net
More information about the pygtk
mailing list