cannot import gtk

Pascal Ronecker ronecker at noos.fr
Mon Nov 25 13:56:33 EST 2002


Thanks !

but i'm still stuck.

For example : GtkText does not exist, neither does Text alone.

What is more, i have other problems with "from gnome.ui import GnomeApp"
and so on.Changing all the code seems a long way to me.
(it is the "eroaster" cd burning tool, a nice all-in-one)


Maybe the right solution is to "install the bindings" as you say, but i
do not have the slightest idea as to what it means...

So if you could explain a bit that last bit, ...
thx !!

Lenny


On Sun, 2002-11-24 at 23:34, Dave Reed wrote:
> On Sunday 24 November 2002 15:59, Lenny wrote:
> > Hi,
> > 
> > I've just installed a RH 8.0, and while trying to use python programs 
> from
> > my previous linuxbox, i encounter the following problems with python :
> > 
> > >    from gtk import GtkVBox
> > >ImportError: cannot import name GtkVBox
> 
> 
> The GTK prefix is removed:
> 
> try: 
> from gtk import VBox
> 
> 
> > this is just an example. I have the same errors with many widgets, but
> > also, with GDK, etc.etc...
> > 
> > I tried with python (that is python1.5), python2 and python2.2
> 
> 
> Red Hat 8.0 doesn't include python 1.5 (just python 2.2.1).
> 
> 
> > I really have gtk+- installed (/usr/include/gtk-1.2 AND gtk-2.0)
> > with (for the example above) a nice gtkvbox.h
> 
> 
> Red Hat 8.0 comes with the libraries for gtk 1.2, but only the python
> bindings for gtk 2.0. If you want to use python with gtk 1.2 you'll
> have to install those bindings yourself.
> 
> 
> > I think python does not know where to look for modules or something 
> like
> > that, but I'm new to this, and do not know what to do.
> 
> Nope, see above.
> 
> HTH,
> Dave
> 






More information about the Python-list mailing list