[Twisted-web] Using Twisted Web for browser-based control
drakesmith at adelphia.net
Sat Dec 17 06:08:40 MST 2005
(non-HTML version.....sorry about that)
I use Twisted Web on an embedded Linux device to provide browser-based
configuration & control. The browser displays a bar graph of a parameter
that is quickly changing on the embedded device (peak audio level). In
order to provide a reasonable feedback to the user, the browser connects to
the Twisted Web CGI server once a second via XMLHTTPRequest to obtain an
updated bar graph level, then Twisted Web dutifully closes the connection.
Is there a way to achieve the same thing without opening & closing a
connection each time?
# ----- Set up the web/CGI server to handle browser-based control -----
from twisted.web import server, static, twcgi
root = static.File("/myResourceDir")
More information about the Twisted-web