module access

rdack rdacker at pacbell.net
Thu May 2 13:57:11 EDT 2002


i am in a directory (call it dira) where i call a method in a file in
a subdirectory (call it dirb).
dirb has __init__.py file in it.
in file 1 I go:
from dirb import fileb
fileb.meth_in_fileb

fine.
but i have a link in fileb that wants to go to another file in dirb.
it doesn't work unless i use dirb as a prefix to the path.
python thinks it is still in dira.

so i have link with 'dirb/filec.py'

fine. 
then if i call the method in fileb again from within the module (say
from filec), that link doesn't work. python now thinks it is dirb and
the prefix in the link messes it up.

what do i need to do?



More information about the Python-list mailing list