Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #3309

Re: PYTHONPATH

From jmfauth <wxjmfauth@gmail.com>
Newsgroups comp.lang.python
Subject Re: PYTHONPATH
Date 2011-04-16 03:03 -0700
Organization http://groups.google.com
Message-ID <a450fed2-825c-4626-ac26-ededb389c6f6@q40g2000prh.googlegroups.com> (permalink)
References <mailman.387.1302856392.9059.python-list@python.org> <%K8qp.22913$J36.20343@newsfe08.iad>

Show all headers | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

PYTHONPATH Algis Kabaila <akabaila@pcug.org.au> - 2011-04-15 18:33 +1000
  Re: PYTHONPATH harrismh777 <harrismh777@charter.net> - 2011-04-15 23:16 -0500
    Re: PYTHONPATH Algis Kabaila <akabaila@pcug.org.au> - 2011-04-16 17:28 +1000
    Re: PYTHONPATH jmfauth <wxjmfauth@gmail.com> - 2011-04-16 03:03 -0700
      Re: PYTHONPATH Algis Kabaila <akabaila@pcug.org.au> - 2011-04-16 20:57 +1000
      Re: PYTHONPATH harrismh777 <harrismh777@charter.net> - 2011-04-17 01:14 -0500
        Re: PYTHONPATH Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-04-17 08:43 +0000
          Re: PYTHONPATH harrismh777 <harrismh777@charter.net> - 2011-04-17 23:37 -0500
            Re: PYTHONPATH MRAB <python@mrabarnett.plus.com> - 2011-04-18 16:31 +0100

csiph-web