Author Archive

January 2, 2009: 4:19 pm: kpdindoor-rowing

This Year’s Hammer Ergatta information was just announced:

It will be at the John Carroll University Recplex on Sunday, February 22.

This indoor regatta benefits a local collegiate rowing club, so if you are in the Cleveland area, come on out, have a little fun, and help out a rowing club.

Contact Chris Maeder for more information.

Iron Hammer from Flicker at http://www.flickr.com/photos/lu0s3r322/2131840958/in/pool-846499@N24

December 30, 2008: 4:10 pm: kpdrowing, indoor-rowing

I found the old Erg-Piece Calculator I wrote back when I maintained the WRRA website. Since it’s been lost on that site, I thought it would be nice post it here.

Just fill in two of the three fields and hit tab or enter. The calculator will fill in the third field, then it’s up to you.

Erg-Piece Calculator

December 9, 2008: 5:18 am: kpdrowing, indoor-rowing, ErgMate

Just a quick update. The first release is feature-complete. At this point I am just waiting on the voice vendor to complete an evaluation of the demonstration/trail mode. ErgMate will ship with a high quality voice that is a marked improvement over MS-Mary, Mike, or Sam.

October 16, 2008: 5:36 am: kpdindoor-rowing, ErgMate

While I’ve not posted any updates in some time (that’s what having a baby will do to you), I have been busy incorporating feedback from the early beta testing. The biggest new feature is a wizard that allows one to create new sequences by simply answering a few questions. You also can now row to music from your iTunes collection in addition to files on disk.

Sample Sequence Wizard page

March 8, 2008: 3:17 pm: kpdPython, wxPython

TimeSpin has a bug in that it reports the same width for GetBestSize when AM/PM is shown and when it is not (24 hour format). This causes an empty space to appear after the control when it is set to display time in 24 hours. I’m not able to fix the bug at this point, but I was able to add a workaround that adjusts the width as needed.

Version 1.4 of the time_spin_and_control distrubution contains the workaround.

February 13, 2008: 7:21 am: kpdPython, wxPython

I added a workaround for a problem with timectrl.

You’ll want to upgrade to the 1.4 version of the time_spin_and_control distribution if you use limited, min, max, or value parameters in Glade when specifying the control.

Edit - 3/8 - updated to version 1.4

February 11, 2008: 7:17 am: kpdPython, wxPython

The program I’m working on (ErgMate) requires entry of hours/mins/seconds durations. I just defined input as total number of seconds for the initial prototypes, but the time has come to make it more usable. I was able to create the bridge code necessary to add the wx.lib.masked.TimeCtrl to the wxGlade widget palette by following examples from Alberto Griggio .

The normal TimeCtrl can bind to an external scroll button. The package also includes a new control called TimeSpin. It is based on Andrea Gavana’s FloatSpin control, and provides both a TimeCtrl and scroll button in one control. TimeSpin does not accept the format nor the scrollBar parameters, otherwise it should be a drop-in replacement for TimeCtrl. Let me know if I missed something important in the interface.

There is (at least!) one minor problem with TimeSpin: It seems to report too large a width - its bounding box is actually wider than the displayed control. I’d appreciate anyone with more knowledge of wxPython than I looking into it and sending a patch. For now it’s good enough to get started using.

Both time widgets are added to wxGlade by untarring the time_spin_and_control distribution from within your .wxglade directory. The included README contains more details.

Edit:
1.1 - fixed codegen problem w/value
1.2 - fixed loading problem when presetting a value
1.3 - added workaround for bug in timectrl when using min/max/limited settings

February 5, 2008: 5:43 am: kpdPython

The February Cleveland Area Python Users Group Meeting was held last night. The guys at BitBacker opened their doors and supplied pizza. It was the best meeting in awhile - 3 talks!

Christian Wyglendowski kicked things off with an overview of SimpleParse. He’s used it in applications from an ini file parser to a parser for an online survey processing language. It looks easy to use. Some time ago I wrote a parser for generating Python code from FLTK’s Fluid GUI builder data files using Spark. A great library, but SimpleParse might have been so much easier - it depends if I could have created or found a grammar for the fluid file format.

Matt Wilson spoke on IPython. I’ve been using IPython for some time and realized I wasn’t making full use of it. Until his talk I didn’t realize how much of IPython I was missing (”You only use 10% of your Ipython’s capabilities….”). Never knew it would assign results to _## where ## is the history line number. That alone will save a lot of time. Matt’s Ipython talk notes are online at his website.

Matt also gave a short talk on Twill. Twill is a domain-specific language used to test websites and web applications. The most interesting part of Twill is its extensibility. He demonstrated how one can add automatic checks as Twill encounters each page in your application - checks for tables-within-tables for example. Matt’s notes contain more information.

These talks gave us a lot to take home and think about.

February 2, 2008: 8:18 am: kpdwxPython

This morning I started getting the following exception when generating code from wxGlade:

Traceback (most recent call last):
  File "c:tempwxGladeapplication.py", line 394, in generate_code
    class_names=class_names)
  File "c:tempwxGladexml_parse.py", line 503, in __init__
   .
   .
   .
  File "c:tempwxGladexml_parse.py", line 593, in endElement
    self.code_writer.add_class(obj)
  File "c:tempwxGladecodegenpy_codegen.py", line 640, in add_class
    indentation = prev_src.spaces[code_obj.klass]
KeyError: 'FancyListControl'

There was only one mention of a similar problem on the wxGlade mailing list. The solution posted there was to start a new project - not really an option at this stage of development.

So after a little digging, I found a different solution.

The item causing the problem is a fancy subclass of ListControl defined in another module. I had placed a wx.Panel in the sizer slot, and had then changed the class to my fancy ListControl. Is the problem now obvious? This fancy list control is not equivalent to a wx.Panel from wxGlade’s perspective. Removing the panel and instead adding a ListControl with my fancy control as the class name fixed everything up.

So, in summary, use the closest matching wxGlade class (ListControl instead of Panel) when using your own classes.

Doh.

January 31, 2008: 10:23 pm: kpdindoor-rowing, ErgMate

It’s coming! Beta testing revealed that new users can use a hand getting started. There’s going to be a wizard to help new users create sequences.

I was going to post a screen shot of the flow, but that’ not very exciting, so instead here’s a screenshot of the latest version. The icons to the left of each clip indicate the type of trigger that causes that particular clip to play. Rulers represent distance, while the clocks represent time. For example, the first power 10 is triggered based on some time from the end of the row. The chain indicates a simple trigger that plays the clip immediately after the clip before it finishes.