def print_profile(name, profile, ts, distance): print print "Profile: %s" % name print "-" * 24 # print header print_profile_header(profile) for t in ts: v = vdot(distance, t) print_profile_row(t, v, profile)
for name, profile in profiles.items(): print_profile(name, profile, ts, distance) # args opts, args = optparse.OptionParser().parse_args() distance = 1600 # 15 sec bins from 6'00 ... 14'00 table_params = { 'start': 6, 'end': 12, 'step_secs': 10 } if len(args): ts = map(si, args) ts.sort() print_profiles(profiles, ts, distance) else: start = table_params['start'] end = table_params['end'] step = table_params['step_secs'] ts = [step * t for t in xrange(start * 60 / step, end * 60/step + 1)] print_profiles(profiles, ts, distance) print for t in ts: print "Marathon est. (@%s): %s h" % (s(t/60.0), s(predict(vdot(distance, t), 42195)/60.0))