wasm-demo/demo/ermis-f/python_m/cur/0424

42 lines
1.3 KiB
Plaintext

From: joe at strout.net (Joe Strout)
Date: Fri, 09 Apr 1999 10:22:00 -0700
Subject: Publishing 'live' Python objects
References: <7ekq6v$of7$1@news2.xs4all.nl>
Message-ID: <joe-090419991022002920@chinacat.salk.edu>
Content-Length: 1060
X-UID: 424
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