location of home made modules

Huaiyu Zhu hzhu at rocket.knowledgetrack.com
Mon May 15 18:01:28 EDT 2000


What is the standard place to put one's home-made modules?
How to get Python to know that place?  I tried to put modules in
~/lib/python/ with the following in ~/.pythonrc 

import sys, os
sys.path.append("%s/lib/python" % os.environ["HOME"])

This works in the interactive interpreter but does not get the module from
program files.  Previously all my modules stay in the same directory as the
programs that load them so this problem did not manifest itself.


I can't find where in the docs this is mentioned.
Thanks for any pointer.

-- 
Huaiyu Zhu                               hzhu at knowledgetrack.com



More information about the Python-list mailing list