[mod_python] cg-bin files execution

John isofroni at cc.uoi.gr
Fri Dec 3 08:39:26 EST 2004


----- Original Message ----- 
From: "François" <py at topmusic.ch>
To: "John" <isofroni at cc.uoi.gr>
Cc: "Mod_Python" <mod_python at modpython.org>
Sent: Friday, December 03, 2004 12:54 PM
Subject: RE: [mod_python] cg-bin files execution


> > Well i enter that url http://myserver/mptest.py/handler
> > And i received the following
> >
> > Hello World!HTTP/1.1 200 OK
> > Date: Thu, 02 Dec 2004 21:31:42 GMT
> (...)
>
> It's OK. With mod_python.publisher the return parameter is the text you
want
> to display :
>
> Good:
> #test.py
> def good-function(req):
> return "<html><body>My Text</body></html>"
>
> http://mysite/test.py/good-function
> will display 'My Text'
>
> Bad:
> #test.py
> def bad-function(req):
> req.write("<html><body>My Text</body></html>")
> return apache.OK
>
> http://mysite/test.py/bad-function
> will display 'My Text' + your error message
>
> François
>
>


Well the good script gave me a syntax error.
Where is the fault?




More information about the Mod_python mailing list