[pygtk] ImportError in pygtk-2.16.0
Rafael Villar Burke (Pachi)
pachi at rvburke.com
Sat Apr 10 23:13:11 WST 2010
On 10/04/2010 16:24, Hossein Movahhedian wrote:
> On 04/10/2010 04:59 PM, Rafael Villar Burke (Pachi) wrote:
>> On 10/04/2010 10:12, Hossein Movahhedian wrote:
>> I think your problem is that you need to install libglade support for
>> gtk and their pygtk bindings, as libglade is not part of pygtk or gtk
>> itself.
>
> Many thanks for your reply.
> libglade-2.6.4 is already installed on slackware 13.0.
Yes, but pygtk must be compiled with libglade support to make it work.
As gtk+ now includes gtkbuilder it's quite possible that you got a
module without such support. You need to check if slackware includes
glade support in the pygtk package.
>> Also, the recommended way now is to use gtk.Builder (which is part of
>> gtk+ itself) instead of libglade, so I'd consider switching.
>
> Unfortunately I don't know how to do this. Is there any patch to do
> this?
You don't need any patch, just a recent pygtk version, the glade ui
designer to open your glade file and save it in gtkbuilder format intead
of libglade format and do minor changes to your code so it uses
gtk.builder instead of gtk.glade. If you are used to using libglade you
shouldn't have problems converting your code to gtk.builder.
You have some examples in the pygtk.org website and the pygtk reference
has gtk.builder documentation.
Regards,
Rafael Villar Burke
More information about the pygtk
mailing list