A
Ajay
hi!
I have the following directory structure.
home
user
index.cgi
common
utils.py
within index.cgi, import utils throws an errors.
I did the following
sys.path.append('../')
and then tried import common.utils and it still throws an error
it works if i give the full path name to common and add that to sys.path as
sys.path.append('/usr/hons/abrar1/lib/html/hons/um/home/common')
My question is why doesn't it work when i add the path to the parent
directory and try import common.utils?
why doesn't that work?
I dont want to rely on the full absolute path
cheers
ajay
I have the following directory structure.
home
user
index.cgi
common
utils.py
within index.cgi, import utils throws an errors.
I did the following
sys.path.append('../')
and then tried import common.utils and it still throws an error
it works if i give the full path name to common and add that to sys.path as
sys.path.append('/usr/hons/abrar1/lib/html/hons/um/home/common')
My question is why doesn't it work when i add the path to the parent
directory and try import common.utils?
why doesn't that work?
I dont want to rely on the full absolute path
cheers
ajay