python local web server

Stephen Hansen me+list/python at ixokai.io
Tue Jun 15 00:59:24 EDT 2010


On 6/14/10 9:41 PM, shanti bhushan wrote:
> Hi ,
> I want to use the python local web server.
> I want to do the following activities with the server.
> 1. I want to change to configuration of any time ,with the help of
> python script.
> 2. I want to log request and response for the server so ,i can use it
> for analysis.
> 
> Please guide me in this respect, if this code is already avaialble
> please update me.
> Please guide me the design or direct me the best approach to do all
> this.

Python does not have a "local web server". Python's standard library
does include a basic server class that can handle HTTP, if you wish to
use it.

But this is not a standalone sort of server that you configure and run.
It is a piece of code in a library, you instantiate and use. You
configure it by writing code. If you would like to configure it via a
config file, you have to write that. Code to read the file, code to set
up the server class based on it, and such.

Guide you? You're asking too much. Too vague. I wouldn't even know where
to start. You really need to go curl up around the docs and spend some
time reading it-- BaseHTTPServer, SocketServer, BaseHTTPRequestHandler
are where you get all the information you are looking for.

-- 

   Stephen Hansen
   ... Also: Ixokai
   ... Mail: me+list/python (AT) ixokai (DOT) io
   ... Blog: http://meh.ixokai.io/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20100614/bb391947/attachment-0001.sig>


More information about the Python-list mailing list