[mod_python] Redirecting to a new window

Nick nick at dd.revealed.net
Wed Jun 2 16:06:19 EDT 2004


Diener, Edward wrote:

> Maybe I should rephrase my question. How do I tell the browser to close
> my current window and open a URL in another window from within Python ? 

Python is processed on the server, and can therefore only affect what the 
browser sees coming from the server.  This generally means the server 
response headers, HTML, and other content coming directly from the server.

If you want to control the client (that is, the browser), then you need to 
use a client/browser side technology to do that, such as Javascript.  The 
extent that Python can help you is only in that your Python code could 
generate the correct Javascript to control the browser in the way you want.

Nick


More information about the Mod_python mailing list