generating stats from stdout on a regular interval

russ russell.sayers at gmail.com
Tue Mar 20 21:45:16 EDT 2007


Hi all,

Very new to Python - but excited to see what is possible - it sounds
very suitable for a project of mine I need a little help with.

I've got an executable which writes out data to stdout in a CSV sort
of format - I'd like to grab the data from stdout and create stats
from it at a regular interval, i.e. every 10 min.  Probably push the
stats out to a CSV file.

The popen2 module can read the stdout just like a file, and the csv
module can handle the reading / writing.  How do I go about
'processing' the stdout every 10 min?

Thanks,
Russ




More information about the Python-list mailing list