[Tutor] Tutor digest, Vol 1 #552 - 11 msgs

Sharriff Aina NHYTRO@compuserve.com
Fri, 19 Jan 2001 01:38:40 -0500

Message text written by INTERNET:tutor@python.org
>I suggest running the CGIHTTPServer that comes with Python
("Batteries Included").

Python 1.5.2 (#1, Aug 25 2000, 09:33:37)  [GCC 2.96 20000731
(experimental)] on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> from BaseHTTPServer import HTTPServer
>>> from CGIHTTPServer import CGIHTTPRequestHandler
>>> import os
>>> os.chdir('/var/www')
>>> os.listdir('cgi-bin')
['printenv', 'test-cgi']
>>> serv =3D HTTPServer(("", 8080), CGIHTTPRequestHandler)
>>> serv.serve_forever()

Then set your browser to 'http://localhost:8080/cgi-bin/test-cgi'
and it will run the /var/www/cgi-bin/test-cgi program.  You can set
the directory as you need to; it could be a directory on a windoze box
or your home directory on UNIX or...


Hi Arcege!

wow thanks! I=B4ve scorged the net looking for an example to imlement thi=
Module and I came up wuith nothing, what is your experience with this
server? have you done some sort of stress test on it? I would like to
develop a small intranet application for 20-40 users and I thought it wou=
be nice code everything in Python. Do you have any experince with MEDUSA(=

python server framework)? I can=B4t get it to work, and the mailing list
seems to ignore my newbie questions about it.

Best regards