Lee Brown
administrator at leebrown.org
Mon Jun 20 17:08:16 EDT 2005
Greetings! Always the first thing to try when nothing appears in the browser: def main(): req.content_type = 'text/plain' req.write('Hello there!') Best Regards, Lee E. Brown (administrator at leebrown.org) -----Original Message----- From: mod_python-bounces at modpython.org [mailto:mod_python-bounces at modpython.org] On Behalf Of amit Sent: Monday, June 20, 2005 2:59 PM To: mod_python at modpython.org Subject: [mod_python] mod_python and execfile Hello, 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? Thanks Amit _______________________________________________ Mod_python mailing list Mod_python at modpython.org http://mailman.modpython.org/mailman/listinfo/mod_python
|