PYTHONPATH on PC
Mikael Olofsson
mikael at isy.liu.se
Wed Feb 23 13:35:25 EST 2000
On 23-Feb-00 David Smith wrote:
> and it still can't find fibo. There wasn't a PYTHONPATH environment
> variable, so I set it locally:
>
> os.environ['PYTHONPATH'] = r'.;C:\David;C:\Program Files\Python\Lib'
>
> and that didn't work. I have found two ways to get Python to find my
> module. One is to put the module directly into C:\Program
> Files\Python\Lib, but that is pretty sick. The other is to modify
> Idle's shortcut to have it start up in C:\David. But what if I or
> someone else wanted to work in a different directory?
I thought you were supposed to do
import sys
sys.path.append('whateverpath')
import yourmodule
At least that's what I do on Unix.
/Mikael
-----------------------------------------------------------------------
E-Mail: Mikael Olofsson <mikael at isy.liu.se>
WWW: http://www.dtr.isy.liu.se/dtr/staff/mikael
Phone: +46 - (0)13 - 28 1343
Telefax: +46 - (0)13 - 28 1339
Date: 23-Feb-00
Time: 19:31:11
This message was sent by XF-Mail.
-----------------------------------------------------------------------
More information about the Python-list
mailing list