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


Groups > comp.lang.python > #3303

Re: PYTHONPATH

From Algis Kabaila <akabaila@pcug.org.au>
Organization PCUG - Users Helping Users
Subject Re: PYTHONPATH
Date 2011-04-16 17:28 +1000
References <mailman.387.1302856392.9059.python-list@python.org> <%K8qp.22913$J36.20343@newsfe08.iad>
Newsgroups comp.lang.python
Message-ID <mailman.414.1302938888.9059.python-list@python.org> (permalink)

Show all headers | View raw


On Saturday 16 April 2011 14:16:59 harrismh777 wrote:
> Algis Kabaila wrote:
> > Is PYTHONPATH a system variable that sets the
> > path for several sessions and if so, where in the system is
> > it? Do I need to create one for setting python path for
> > several sessions?
> 
>snip... 
> Of course this only works if the Python folder exists in the
> users ~/ directory tree (or elsewhere, if you code it that
> way).
> 
> 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)
> 
> kind regards,
> m harris

My apologies for not stating that I do use a "nix" system - 
kubuntu 10.10. I switche to ubuntu/kubuntu from suse some time 
ago. Suse had by default a ~/bin directory.  On ubuntu/kubuntu 
the user needs to create it.

Thank you for your contribution - you adressed exactly the issue 
that I wanted to take care of - testing different systems (PyQt 
v. PySide, Python 2.7 v Python 3.2 etc.)  

It is a significant help!

Sorry I can not address you by name, as your signature is 
suggestive that it may start with M and that Harris is your 
surname (or pseudo name).  You have been most helpful!

OldAl.

-- 
Algis
http://akabaila.pcug.org.au/StructuralAnalysis.pdf

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