What is the significance of pygtk.require('2.0')?
- From: Robert Park <rbpark exolucere ca>
- To: python-hackers-list gnome org
- Subject: What is the significance of pygtk.require('2.0')?
- Date: Wed, 27 Oct 2010 18:29:34 -0600
On the page http://live.gnome.org/PyGObject, it gives this example:
$ python
import pygtk
pygtk.require('2.0') # adds gi to the pythonpath
import gi
print gi.__file__
However, this works just fine:
$ python
Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
>>> print gi.__file__
/usr/lib/pymodules/python2.6/gtk-2.0/gi/__init__.pyc
>>>
And in fact, if I remove the 'import pygtk' and 'pygtk.require' from
my program, it continutes to operate totally normally.
Can somebody clarify the meaning of the pygtk import statement and
whether or not it is still relevant while using the
gobject-introspection bindings?
Thanks.
--
http://exolucere.ca
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]