From: Jussi S. <jus...@pp...> - 2006-09-03 17:34:41
|
Apologies for the long post! I've made 2 applications that could interest others also. 1. Blood Pressure Monitor (BPM) BPM is a PythonCard application for storing values of blood pressure measurements and for producing PDF charts of those values. The chart can be used by the physician of a patient to control the effect of the medical treatment being used. Despite its rather pompous name BPM is a modest, simple to use program. All it does could probably have been accomplished easily by a couple of Office macros, but I'm only willing to use tools that include Python or at least Py in their names.;) The purpose was to make - the data entry fast but still ensure the validity of the data - the charting in the ideal case happen with a single mouse click BPM produces a one-page PDF file containing: - the 'traditional' date-oriented systolic and diastolic pressure graphs - the scatterplot of (systolic, diastolic) pairs - the BP value distribution as a bar chart with BP values as X-axis and the frequencies of those values as Y-axis. - the quartiles Q1-Q3 for systolic and diastolic pressures After that BPM starts Acrobat Reader giving it the name of the file produced. The chart can then be viewed and printed or e-mailed as need be. BPM could serve as an example for developers using Pythoncard of how to use wx.Notebook and wx.Grid with Pythoncard. It might also be an example of how to do things the hard and wrong way, because part of what I've accomplished has been the result of trial-and-error. Some of the things I would have liked to been able to do I couldn't. For example, I would have liked to make the first field 'sDay' of the second tabsheet 'Data Chart' to be active when coming to this tab the first time after the start and yet to have the first tabsheet 'Data Entry' and preferably the (0,0) cell of the grid in it be active. Trying to do this resulted in a perverse condition where I had activated the 'Data Entry' with 'stringselection' and yet the input focus was in the 'sDay' field in the hidden tabsheet 'Data Chart'! 2. A Trick Card Game This card game belongs to the "plain trick games without trumps" category. I'm not aware of its name, so I'll have to describe its rules. The game is simple so it is particularly suitable for children. One player plays against 3 computer players. Each player is dealt a hand of 5 cards. A round consists of each player in turn playing one card. The suit of the leading card determines the suit to play in that round. If the player has cards of that suit, he has to play the suit but he is not forced to use a higher-valued card. If the player does not have the leading suit, any suit can be played. The player with the highest card of the round's suit wins the trick getting 1 point. The game comes with UIs defined for two languages, English and Finnish, and with description on how to translate the UI to some other language. 3. Environment and download The programs have been developed and tested on Windows XP Home SP2 using the following great software: Python 2.4.3, wxPython 2.6.3, PythonCard 0.8.2, PyChart 1.34 and Acrobat Reader 7.0.8. They have a non-essential Windows dependence of using winsound with error messages. They are distributed under the MIT license (see the attached file License.txt) The download page is: http://personal.inet.fi/cool/operator/ProgToDownload.html |