Setting Environment Variables

Ben Ocean lists at TheWebsons.com
Sat Dec 23 14:30:24 CET 2000


Thanks. I did as you suggested, adding the path to my *webmaster* account,
but it's not part of the sys.path, which (I presume) is what I want and
need:

thor:/home/webmaster# python
Python 2.0 (#1, Oct 16 2000, 18:10:03)
[GCC 2.95.2 19991024 (release)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/local/lib/python2.0', '/usr/local/lib/python2.0/plat-linux2',
'/usr/local/lib/python2.0/lib-tk', '/usr/local/lib/python2.0/lib-dynload',
'/usr/local/lib/python2.0/site-packages']

Please advise.
TIA,
BenO

-----Original Message-----
From: python-list-admin at python.org
[mailto:python-list-admin at python.org]On Behalf Of David Porter
Sent: Saturday, December 23, 2000 4:18 AM
To: Python List
Subject: Re: Setting Environment Variables


* Ben Ocean <beno at TheWebsons.com>:

> I'm trying to set environment variables so I can define my own path for my
> modules. My problem is I don't know where to set the PYTHONPATH. My book
> says do it in the .cshrc file: where the heck's that? My Linux book says
it
> should be in the /home directory, but it isn't. I own this server and it's
a
> standard RedHat 6.2 install. Please advise.

What is your shell? It is probably bash. if so, add something like this to
/home/username/.bashrc:

export PYTHONPATH=/path/to/modules

If adding more than one path put a colon between them.


David

--
http://www.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list