Re: What is the significance of pygtk.require('2.0')?



On Thu, Oct 28, 2010 at 02:29, Robert Park <rbpark exolucere ca> wrote:
> 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?

If anybody is able to clarify that, please update
https://bugzilla.gnome.org/show_bug.cgi?id=621525 .

I'm not sure what can be done without screwing current users.

Regards,

Tomeu

> Thanks.
>
> --
> http://exolucere.ca
> _______________________________________________
> python-hackers-list mailing list
> python-hackers-list gnome org
> http://mail.gnome.org/mailman/listinfo/python-hackers-list
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]