Skip to content

Instantly share code, notes, and snippets.

@jdrake
Created January 17, 2012 23:09
Show Gist options
  • Save jdrake/1629671 to your computer and use it in GitHub Desktop.
Save jdrake/1629671 to your computer and use it in GitHub Desktop.
Example of table()
>> print table(
sorted(team.special_events.values(), key=lambda e:(e.period, e.time)),
["period","time","type","player_in","player_out"],
{
'period':{'align':'rjust'},
'time':{'format':toTime, 'align':'rjust'}
}
)
PERIOD TIME TYPE PLAYER_IN PLAYER_OUT
------------------------------------------------
1 33:59 yellowCard None 28947
2 14:24 sub 13914 33843
2 25:09 sub 18178 15486
2 35:12 sub 17775 21030
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment