[Tutor] web site redirection to Python script

dman dsh8290@rit.edu
Wed, 12 Dec 2001 13:52:06 -0500


On Wed, Dec 12, 2001 at 09:19:59AM -0500, Lloyd Kvam wrote:
| Danny Yoo wrote:
| 
| > But perhaps you might want to make this more transparent, so that the user
| > is never aware of PythonServer's existance; that is, maybe we want
| > something like this:
| > 
| >     PC/Browser <-----> www.HowsYourHealth.org <-----> PythonServer
| > 
| 
| Keeping the PythonServer hidden in the background would make
| everyone happier. 

In python-pseudocode, I imagine that the following would work

import urllib
f = urllib.open( "http://the_real_server.com/path_to_cgi.py?" +
                    "rebuild the form submission URL" )
print f.read()
f.close()


I don't know enough perl to know how to do this in perl.

-D

-- 

Failure is not an option.  It is bundled with the software.