def hiscore(self, name, t, d): # Load hiscore and add current to it. score = Hiscore('.score', 'static.sidvind.com:80', '/2011/sphorse/', 2) score.add(name, distance=d, time=t) # Global hiscore. score.push() score.fetch(result=(name, d, t)) # Store hiscore. score.store() print 'Total time: %ds' % t print 'Total distance: %dm' % d if score.placement > 0 and score.placement < 10: print 'Placement: %d' % (score.placement+1) print score.print_global()