On Wed, Sep 29, 2004 at 03:00:46PM -0300, Guilherme Salgado wrote: > On Wed, 2004-09-29 at 08:19, Antoon Pardon wrote: > > On Wed, Sep 29, 2004 at 11:16:19AM +0100, Gustavo J. A. M. Carneiro wrote: > > > Qua, 2004-09-29 �s 12:05 +0200, Antoon Pardon escreveu: > > > > > > > > > > > I'm running Debian Sarge with python 2.3.4 and python-gtk2 2.2.0 > > > > So pygtk 2.2.0 is in /usr/lib and pygtk 2.3.97 is in /usr/local/lib > > > > > > Maybe you need to adjust PYTHONPATH... > > > > > That won't do any good. I have found out that my python configuration > > puts /usr/local/lib/python before /usr/lib/python. That means that > > normally all pygtk program will import the 2.3.97 version. > > > > Maybe you can put /usr/local/lib/python after /usr/lib/python in > PYTHONPATH and then create an alias like this: > alias > pygtk2.3.97='PYTHONPATH=/usr/local/lib/python2.3/site-packages:$PYTHONPATH python'
You don't understand. Because /usr/local/lib/python is before /usr/lib/python the 2.3.97 libraries will be loaded by pygtk unless other measerments are made. That means that all such programs, including those by other users who don't know anything of this test, will use the test libraries. I don't mind needing to do something in order to run a program with the test library. I mind needing to do something to prevent a program to run with the test library. > Then you can run your tests with pygtk2.3.97. (pygtk2.3.97 test.py) > > If, for any reason you can't put /usr/local/lib/python after > /usr/lib/python, you can install pygtk2.3.97 in another prefix, and make > that prefix appear after /usr/lib/python in the PYTHONPATH, to make sure > your normal programs will import the 2.2.0 version. That what I ended up doing. I made a /usr/beta directory and put /usr/beta/lib/python/site-packages in PYTHONPATH when I want to test my programs with the test library. -- Antoon Pardon _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
