[mod_python] mod_python and execfile

amit amit at digitalpeers.com
Mon Jun 20 14:58:34 EDT 2005


    I am using mod_pyton to write a collection of scripts. And I am 
facing the following problem:
I use the handler to execute a script. And I try to pass the req object 
to it:

def handler(req):
     execfile(req.filename, {'req':req})

in the script I have the following code:

def main():
    req.write('Hello there!')

I know that the script is executed but I don't get the 'hello there!' 
message in my browser. Can anyone help?


More information about the Mod_python mailing list