about python modules

Scott David Daniels Scott.Daniels at Acm.Org
Wed May 21 23:07:25 EDT 2008


srinivas wrote:
> ... i want to know how to import my functions folder to python in
> sucha way that the functions in functions folder should work like
> python library modules .
> 
> i have  python in folder C:\python25\..
> and functions folder D:\programs\Functions\
> 
> pls help me friends how to do that.

An unmentioned possibility:
Create a file named "whatever.pth" (where the "whatever" is your
choice).  The contents of this file should be a line containing the
path to your directory (in your case a single line containing
"D:\programs\Functions" (w/o the quotes).
Put this file in your site-packages file (for windows in your case,
that is C:\Python25\Lib\site-packages


--Scott David Daniels
Scott.Daniels at Acm.Org



More information about the Python-list mailing list