Publishing 'live' Python objects
Joe Strout
joe at strout.net
Fri Apr 9 13:22:00 EDT 1999
In article <7ekq6v$of7$1 at news2.xs4all.nl>, Camiel Dobbelaar
<dobbe at xs3.xs4all.nl> wrote:
> I'm looking for advice on the following:
>
> Suppose I have a Python program that essentially does the following:
>
> while 1:
> read from stdin
> <fancy calculations>
> update some buffer objects
>
> I now wish to take a look at snapshots of those buffer objects in
> 'real-time'. (the program continues running and updating the buffers)
> I'd like to do this with HTTP.
I'd suggest you periodically, during <fancy calculations>, copy the
buffer objects to a file, e.g. with pickle. Then you can have another
Python CGI script read these files and display them upon request.
Cheers,
-- Joe
--
,------------------------------------------------------------------.
| Joseph J. Strout Biocomputing -- The Salk Institute |
| joe at strout.net http://www.strout.net |
`------------------------------------------------------------------'
Check out the Mac Web Directory! http://www.strout.net/macweb.cgi
More information about the Python-list
mailing list