[mod_python] Graphs in a webpage

Gregory Trubetskoy grisha at modpython.org
Tue Nov 14 10:22:48 EST 2000


On Tue, 14 Nov 2000, Alexis Iglauer wrote:
> 
> First of all, thank you to everyone for the pointers.
>  
> > I used gd with nsapy on a windows machine in 1997
> 
> Will check it out, thanks....

You're using it already.

> My datafiles are time series data, usually for 24
> hours at a time, so I will have a whole bunch of
> datafiles which make up a contiguous set of data over
> several days/months/years.

Sounds like you need a function that checks the file modification dat and
reads it only if it has been changed.

>  The last datafile will probably always be growing.  A two-stage
> caching module may do the trick.

I don't know what you're doing there, but I suspect you may benefit
from RRDTool (http://ee-staff.ethz.ch/~oetiker/webtools/rrdtool/)

> > Python "import" mechanism - make a module that reads all your
> > ascii files,
> 
> Does "first time" here mean the first time apache is started or the
> first time an apache process is (re)started?

It would be whenever that import statement is executed, which usually is
at the first hit after apache was (re) started. There is also a
PythonImport directive, which will allow you to do this at process start
up time rather than the first hit, but PythonImport has some caveats (read
the docs)

Grisha




More information about the Mod_python mailing list