[Tutor] Writing serialized objects from BaseHTTPServer

Arun Kumar PG arunkumarpg at gmail.com
Thu Oct 19 13:11:28 CEST 2006

Hi Guys,

I wrote a simple server using sockets ,the traditional whille True:
scoket.accept() approach. This server reads some pickled parameters sent by
the client using the cPickle module -> do some processing -> and finally
writes a list of tuples, objects using cPickle back to the client output
stream (cPickle.dump).

Now I want to replace this server with an HTTP server. Python's
BaseHTTPServer basically. I was wondering when using BaseHTTPServer if I
want to read/write a serialized object to meet the above behavior how could
I achive this using HTTP server ? We need a content-type to specify before
writing back to the client -- whats the content-type for serialised objects
which I want to write back to the client using cPickle ?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20061019/2af06d5c/attachment.html 

More information about the Tutor mailing list