[mod_python] How to terminate responce?

Clark foo.Clark at gmail.com
Tue Jun 7 04:08:19 EDT 2005


Hi,

With PSP, how to terminate current response?

I want to check some condition, if it's satisfied, I'll continue, 
otherwise I'll finish current page. To finish current page, is there
some function like "req.end()"?

For example, the PSP script is as follows:

<%
if xx != 0:
   req.end(); 

...
%>

Actually, there isn't a function "req.end()". I've try to use
"sys.exit()" instead, but this one will cause a exception. 
I want to finish the page normally, not a exception.
Can you give me some hints?

Clark


More information about the Mod_python mailing list