importing

Mikael Olofsson mikael at isy.liu.se
Tue Oct 12 09:04:34 EDT 1999


On 12-Oct-99 Peter Posselt Vestergaard wrote:
 >  Hi
 >  How do I import a library file which isn't placed in the same directory
 >  as the python-file and neither in a directory in my path???

My solution is the following, which I think is the correct one:

import sys
sys.path.append('yourpath')
import yourlibrary

Then at least I would be up and running.

/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:    12-Oct-99
Time:    15:01:46

This message was sent by XF-Mail.
-----------------------------------------------------------------------




More information about the Python-list mailing list