pyFlite – Python Flite Speech Synthesis
This is an inital cut of a Flite (Festival Light) python wrapper. It will speak arbritary text passed to it. Some strings cause the library to lock up. I am not sure why. Enjoy!
pyFlite – Python Flite Speech Synthesis
This is an inital cut of a Flite (Festival Light) python wrapper. It will speak arbritary text passed to it. Some strings cause the library to lock up. I am not sure why. Enjoy!
As a kid, my older brother and I would head up to the local arcade and play Atari’s primitive tank combat game. This was a long time before Doom, a time when simple gray-scaled graphics sufficed.
I spent a long time creating a clone of Tank when I received my first computer, the TI-99/4A. It was one of my first real programs. Very blocky, very slow, and a whole lot of fun. One option was that your could shoot trees and receive a point for each shot if you killed the other tank. The idea was that while one player was busy shooting trees, the other might sneak up behind for the kill.
I recreated Tank as Super Tank over Christmas break one year in college. This was a good excuse to practice my nascent C language skills. BBS’s and the Net were around and the game made it to a few archives.
Not having thought much about the game over the last few years, I was happily surprised to stumble on it last week at a site called Abandonware. They even gave it a decent review! Seeing the screenshots brings back some great memories.

It would be great fun to port it to PyGame some day.
Robert Walton, a local referee, is offering a free clinic at the Cleveland Rowing Foundation boathouse on Monday, February 27, from 7 to 8 pm. ‘Introduction to Officiating, or “What are the People in the Blue Shirts Doing?”‘ will include:
This is a great opportunity to learn about the rules of rowing and understand a little better what is happening on regatta day.
To A Noble and Excellent End – or Pain Management in a 2K Erg Piece
My rowers and coxswains pulled their second 2K Erg tests of the year today. It’s always energizing watching them come together for these pieces. You can’t help catch the energy they generate as they row and cheer each other. I was able to stop up a little early and talk to them about pain management in the context of a 2000 meter erg piece. We discussed:
Pain vs. ‘the feelings of working hard’: Pain is a protection mechanism that minimizes bodily harm, erging pain is a sign that you are working hard, growing, pushing limits, etc. It is unfortunate that our language does not distinguish between the two sensations, but it does not so all feelings are lumped as ‘pain.’
Tolerance: Some people tolerate ‘pain’ better than others. Why? They attribute the pain to different things ( I am working hard vs. I am out shape), confidence – having blasted through it in the past makes it easier to do so again, and desire – if you don’t want to challenge yourself this way then you should rethink your decision to row on a competitive crew team.
Techniques to actively deal with the pain of a 2000 meter row:
Those reading this that are not rowers may not understand why mostly sane people would put themselves through something like this. An excerpt from one of my former rowers says it best. She has just described the feeling of the first time she broke 8 minutes on the 2K erg test:
I still wonder how I stuck through that first winter, having rowed only four times the past fall and knowing nothing of the spring sprint season, that heavenly light at the end of the tunnel. Whenever I find myself in need of extra motivation to push me into the lion’s den, to lead me like a lamb to the slaughter of the erg, I remember that 2K, the approval of my role models, captains and coaches at my achievement and the unrestricted pride and confidence I had in my own ability. I remember what that room has taught me- to push myself to the farthest limit and with one more stroke to break it, to sacrifice a moment’s happiness, comfort and oxygen for later reward, and that I am mentally and physically stronger than I ever thought possible. I now know I can enter hell and emerge triumphant, and even have fun along the way. I know I will enter the erg room with reluctance and face the erg with apprehension, but I know I can and will prevail, for the erg room is not really hell, and it is not the enemy, but the best means to a noble and excellent end.
So, how do you manage the pain of a 2000 meter erg piece? I’d love to hear your answer in the comments.
Years ago I spent quite a bit of time learning and using SWIG, mostly in the creation of the pyFLTK Fast Light Toolkit wrappers for python. Swig was, and still is an impressive piece of work – Dave Beazely and the other guilty parties have done a lot to make scripting languages more useful. Pyrex is getting a lot of attention lately. People seem to love it, so I gave it a try. I have a python extension that wraps some C++ classes for the Concept II Rowing Machine. The early implementation was in SWIG. I reimplemented the extension using Pyrex. Some thoughts on the results:
I wasn’t able to compare sizes of the resulting extensions as I now have different functionality in each version. The Pyrex code being in a single file does make things simpler to manage.
Since it is working well and I have no need to support other scripting languages, the extension will remain in Pyrex. This is not a slam on SWIG and I’m sure in other projects SWIG will be used again.
I was having some trouble getting a window to resize when the contained controls were shown or hidden. After some searching and experimentation, I found this sequence to work:
def OnInit( self ):
self.res = wxXmlResource( GUI_FILENAME )
self.frame = self.res.LoadFrame( None, GUI_MAINFRAME_NAME )
self.frame.Show(1)
self.showControls = XRCCTRL(self.frame, 'showControls')
self.controlPanel = XRCCTRL(self.frame, 'controlPanel')
self.Bind( EVT_TOGGLEBUTTON, self.OnChange, self.showControls)
return 1
def OnChange(self, event):
sizer = self.frame.GetSizer()
sizer.Show( self.controlPanel, show=self.showControls.GetValue(), recursive=true)
size=sizer.GetMinSize()
self.frame.SetMinSize(size)
self.frame.Fit()
where gui.xrc is:
<?xml version="1.0" encoding="cp1252"?>
<resource>
<object class="wxFrame" name="FRAME1">
<title>Test</title>
<centered>1</centered>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxToggleButton" name="showControls">
<label>Show Controls</label>
<checked>1</checked>
</object>
</object>
<object class="sizeritem">
<object class="wxPanel" name="controlPanel">
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<object class="wxStaticText" name="theLabel">
<label>Label:</label>
</object>
</object>
<object class="sizeritem">
<object class="wxTextCtrl" name="theTextControl"/>
<option>1</option>
</object>
</object>
</object>
</object>
</object>
</object>
</resource>
2/1 Update – had wrong app code in place
Cleveland Area Python Interest Group
Monday I attended my first Cleveland Area Python Interest Group meeting. There were about 12 people present, although there are about 40 people on the CLEPY google group. Ian Maurer gave a great introduction to jython. I’ve used it to create some custom Ant tasks for Java in the past, so much of it was a good review. The jylluminate module is something new that looks interesting. It provides the introspection capabilities we’re used to in cpython. Jaison Lee gave a presentation on the SCONS build tool. The tool’s strength appears to be it’s hiding of nuances between different target platforms to the build-script maintainer. Think of it as a replacement for make that uses python scripts instead of makefiles. Looking forward to the next meeting.