PYTHONPATH

Algis Kabaila akabaila at pcug.org.au
Fri Apr 15 06:20:14 EDT 2011


On Friday 15 April 2011 19:21:12 Chris Rebert wrote:
> On Fri, Apr 15, 2011 at 1:33 AM, Algis Kabaila 
<akabaila at pcug.org.au> wrote:
> > Hi,
> > 
>>snip..
> It is an environment variable:
> http://en.wikipedia.org/wiki/Environment_variable
>> Alternatively, you can use a .pth file to add directories to
> the module search path:
> http://docs.python.org/library/site.html
>> Cheers,
> Chris

From Gabriel Genellina:
> <akabaila at pcug.org.au>
> escribió:
> > An elementary question that is bugging me, regarding
>> PYTHONPATH is an environment variable, you set it the same
> way as any other, the details depend on the operating
> system/shell you're currently using.
>> But - why do you think you need to set PYTHONPATH? Don't do
> that. Use the standard places to put your library modules
> and packages, like site-packages (where third-party
> libraries are installed by default). From Python 2.6+ the
> search path includes per-user directories like
> ~/.local/lib/python2.6/site-packages and
> %APPDATA%\Python\Python26\site-packages (see PEP370 [1] for
> details) so you don't even have to mess with the Python
> installation directories.
>>> [1] http://www.python.org/dev/peps/pep-0370/

Thank you Gabriel and Thank you Chris, for your valuable advice 
and equally valuable set of references. Greatly appreciated! 
To answer the question of why consider a local "sandbox" to test 
various versions of a set of programs downloaded from the net. 
It is very handy to be able to change the "standard" behaviour 
to a localised "users standard". Even more important, of 
course, is to know what standards there are.
Thank you for your prompt and valuable assistance,
OldAl.
-- 
Algis
http://akabaila.pcug.org.au/StructuralAnalysis.pdf


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /