[mod_python] module import

Lionel Roubeyrie lroubeyrie at limair.asso.fr
Mon Jan 24 11:13:06 EST 2005


Hi all,
new in the mod_python's world, I'm starting with a little problem of import.
The index.py page must import a package in the subdirectory where index.py is, 
then I wrote:
import os, sys
current_path = os.getcwd()
top = os.path.join(current_path, '../')
if top not in sys.path : sys.path.append(top)
import my_mod

mod_python raise an error, but puting the lines in a python shell works!
Do I have to do anything else?

-- 
Lionel Roubeyrie - lroubeyrie at limair.asso.fr
LIMAIR
http://www.limair.asso.fr



More information about the Mod_python mailing list