[Tutor] question about sys.path and importing
Dick Moores
rdm at rcblue.com
Tue Oct 3 20:21:23 CEST 2006
This morning I was sternly warned by Wingware support not to leave my
module of useful functions in Python25\Lib. So I put it in a
subfolder in site-packages I named "mine". Importing of or from that
module, mycalc.py goes well, to my surprise, because of
>>> import sys
>>> [x for x in sys.path if "site-packages" in x]
['e:\\Python25\\lib\\site-packages',
'e:\\Python25\\lib\\site-packages\\win32',
'e:\\Python25\\lib\\site-packages\\win32\\lib',
'e:\\Python25\\lib\\site-packages\\Pythonwin',
'e:\\Python25\\lib\\site-packages\\wx-2.6-msw-unicode']
>>>
in which "mine" isn't included, even though other folders in site-packages are.
Can someone explain this, please?
Dick Moores
More information about the Tutor
mailing list