module search path
From: Ajay (abra9823_at_mail.usyd.edu.au)
Date: 07/30/04
- Next message: Terry Reedy: "Re: A goto-like usage of a function"
- Previous message: Neal Norwitz: "Re: Test failures on AIX 5.1 for 2.3.4"
- Next in thread: angel: "Re: module search path"
- Reply: angel: "Re: module search path"
- Maybe reply: Jeff Epler: "Re: module search path"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Jul 2004 12:20:13 +1000 To: python-list@python.org
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
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
- Next message: Terry Reedy: "Re: A goto-like usage of a function"
- Previous message: Neal Norwitz: "Re: Test failures on AIX 5.1 for 2.3.4"
- Next in thread: angel: "Re: module search path"
- Reply: angel: "Re: module search path"
- Maybe reply: Jeff Epler: "Re: module search path"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|