On Mon, Nov 04, 2002 at 04:02:59PM -0600, Tanya Brethour wrote:
> picked the first one. I installed it in a separate directory
> (/usr/local/lib/python2.2/site-packages). I added that path to my
> PYTHONPATH environment variable.
>
> So now... I have a couple of questions
>
> 1) Shouldn't there be a gtk.py in /usr/local/lib/python2.2/site-packages?
> I am only seeing pygtk.py. So calling import gtk only gets the old pygtk.
No; you should set PYTHONPATH to
/usr/local/lib/python2.2/site-packages/gtk-2.0/
If you want "import gtk" to work straight away. I *think* that if you
do:
PYTHONPATH=/usr/local/lib/python2.2/site-packages/
Then the following:
import pygtk
pygtk.require("2.0")
import gtk
Might work.
> 2) Now when I put that path into my PYTHONPATH environ variable.. does it
> go to that directory first before the "default" (not sure if its termed
> default.. but the one that is in /usr/lib/python2.2)
Yes, it does. If you set pythonpath to "/usr/xxx" it will look first in
/usr/xxx, and then in the default system path. To debug these things,
use:
strace -eopen python xxx.py
And look at the open() system calls.
Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/