BloodPressure.py
Andre van der Vlies
andre at vandervlies.xs4all.nl
Fri Feb 22 14:38:26 EST 2002
More information about the Python-list mailing list
Fri Feb 22 14:38:26 EST 2002
- Previous message (by thread): Newbie: Crazy, but Quick
- Next message (by thread): Request for Stackless Sponsorship
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
#!/usr/local/bin/python # # Tue Feb 19 08:59:38 CET 2002 -- A.G. van der Vlies <andre at vandrevlies.xs4all.nl> # Orignal coding. Made for my brother and cardiologist (??). One regulary asked # what my blood pressure was, the other was really happy with a printout.... # Obviously you'll need gnuplot. # I guess (hope) there are more people who have an 'interest' in this. import time import Gnuplot HTML_PATH = '......../public_html/BloedDruk/' FILE = 'bloeddruk-' EXT = time.strftime("%b-%Y", time.localtime(time.time())) Gfx = HTML_PATH+FILE+EXT+".gif" Stat = HTML_PATH+FILE+EXT+".stat" OutPut = open(Stat, "a+", 0) # ## This is dutch. I'll try an english translation... # # bovendruk = raw_input('Geef de bovendruk: ') # onderdruk = raw_input('Geef de onderdruk: ') # pulse = raw_input('Geef de hartslag: ') bovendruk = raw_input('Upper pressure: ') onderdruk = raw_input('Lower pressure: ') pulse = raw_input('Pulse: ') NOW = time.strftime("%d-%b-%Y/%H:%M", time.localtime(time.time())) item = "%s %s %s %s\n" % (NOW, bovendruk, onderdruk, pulse) OutPut.write(item) OutPut.close() print bovendruk, onderdruk, pulse, NOW g = Gnuplot.Gnuplot() g('set xdata time') g('set timefmt "%d-%b-%Y/%H:%M"') g('set format x "%d-%m\\n%H:%M"') g('set grid') g('set terminal gif') g('set output "%s"' % Gfx) g.plot(Gnuplot.File(Stat, using='1:2', title='Sys', with='linespoints'), Gnuplot.File(Stat, using='1:3', title='Dia', with='linespoints'), Gnuplot.File(Stat, using='1:4', title='Pulse', with='impulses'), ) -- Andre van der Vlies <andre at vandervlies.xs4all.nl> Homepage: http://vandervlies.xs4all.nl/~andre Key fingerprint = 99 DC D6 01 96 C2 48 80 DC 9C D5 D2 34 F6 A6 5D -- Open Source is a philosophy not a price tag! -- -------------- next part -------------- A non-text attachment was scrubbed... Name: andre.vcf Type: text/x-vcard Size: 237 bytes Desc: Card for Andre van der Vlies URL: <http://mail.python.org/pipermail/python-list/attachments/20020222/33ec7f70/attachment.vcf>
- Previous message (by thread): Newbie: Crazy, but Quick
- Next message (by thread): Request for Stackless Sponsorship
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list