tor 2003-01-02 klockan 11.53 skrev Christian Reis:
> So, is import pygtk required or not for pygtk2?
It depends.
1) Where python is installed
2) How pygtk.pth looks like
If python is installed in a site dir, /usr or /usr/local (not in /opt or
/usr/local/pygtk), pygtk.pth is processed.
If pygtk.pth is processed the content of this file is added to sys.path.
For example, if it says gtk-2.0 and is in
/usr/local/lib/python2.2/site-packages, .../site-packages/gtk-2.0 will
be added to sys.path.
For example, if pygtk 0.6.x where x is higher than 11 is installed on a
Red Hat 8.0 system, which provides 1.99.12 we have the following
scenario:
import gtk -> pygtk 1.99.12
import pygtk
pygtk.require('1.2')
import gtk -> pygtk 0.6.x
import pygtk
pygtk.require('2.0')
import gtk -> pygtk 1.99.12
As you can see pygtk is required for 0.6.x, but not for 1.99.12, since
On a old system with 0.6.x as default, Red Hat 7.x for example, it's the
opposite import gtk -> 0.6.x and import pygtk;pygtk.require is required
for 1.99.x (which is installed by the user)
--
Johan Dahlin <[EMAIL PROTECTED]>
Async Open Source
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/