On 16 avr, 06:16, harrismh777 <harrismh...@charter.net> wrote:
> By default the sys.path always shows the directory python was opened in, > usually the users home directory. With .profile you can set the path > any way you want... most useful for setting up special test directories > ahead of the "real" code, or for setting up separate directories for > versions--- one for Python26, Python27, and of course Python32. > > (there are other ways of accomplishing the same thing, and of course, > this one only really works with *nix systems--- windows is another mess > entirely) > I belong to those who are very happy with the Python installations on Windows platform (thanks MvL, this should be said) and I hope it will continue like this. I do not see any mess here. Every Python version lives in its own isolated directory, including \site-packages. That means I can keep, eg, a Python 2.5 application (*) which is using PIL, wxPython and numpy in a running state, while developping new applications with other Python versions or porting that application (*) to another Python version. And that on all Windows versions (Win2K, XP, Vista, Win7) modulo the underlaying os-libs compatibility, but that's the same problem on all os, especially for the GUI libs. I'm using Python since ver 1.5.6 and I never set any PYTHONPATH environment variable. A final word about sys.path. This is is my mind the most clever idea of Python. I have the feeling, no offense here, you are not understanding it very well. The sys.path is some kind of *dynamic* environment variable and has basically or primarily nothing to do with a user directory. jmf -- http://mail.python.org/mailman/listinfo/python-list