converting splits

Former Member
Former Member
Converting back and forth between minutes and seconds to get your splits is tedious, so I wrote a simple python program to do it. Maybe MS excel does it for you, but I wouldn't know, I haven't used any MS products in almost a decade. This will work on a Mac from the shell window (renamed to splits.txt to upload. rename it back to splits.py and make it executable with chmod to run it, but you knew that if you use a Mac, right?) $ cat 500-20080413.txt | ./splits.py 31.88 31.88 1:06.17 34.29 1:40.66 34.49 2:15.71 35.05 2:50.31 34.60 3:24.67 34.36 3:58.76 34.09 4:33.59 34.83 5:08.66 35.07 5:43.08 34.42 ah, I can't get python format strings to work like I'm used to other languages behaving. change __str__ if you want seconds 't get python float format strings to behave. if (self>60): return '%d:%02d.%02d' % (self / 60, self % 60, 100 *((self % 60) - int(self % 60))) else: return '%02d.%02d' % (self % 60, 100 *((self % 60) - int(self % 60)))
Parents
  • Former Member
    Former Member
    Swimmers who run shell scripts and use Macs.. I think you're addressing a very small, masochistic minority here. :) Nice pacing on the 500 though. This was today's meet? you must have been in heat 7 or 8. I didn't swim the 500, but I did the counting for a teammate in heat 8. Heat 9 was crazy. The guy who won swam something like a 4:58.
Reply
  • Former Member
    Former Member
    Swimmers who run shell scripts and use Macs.. I think you're addressing a very small, masochistic minority here. :) Nice pacing on the 500 though. This was today's meet? you must have been in heat 7 or 8. I didn't swim the 500, but I did the counting for a teammate in heat 8. Heat 9 was crazy. The guy who won swam something like a 4:58.
Children
No Data