"A HTTP Push CGI module for Python" import sys import cgi import re class HTTPPush: def __init__(self): parms = cgi.FieldStorage() self.type = parms.getvalue("pushtype") if self.type == "event": print "Content-Type: application/x-dom-event-stream\n" elif self.type == "multipart": print "Content-Type: multipart/x-mixed-replace;", print "boundary=\"bndry\"\n" # Dump a kb of data to flush browsers print "--bndry" elif self.type == "iframe": print "Content-Type: text/html\n\n" # Dump a kb of data to flush browsers # print "
" # print "