diff options
Diffstat (limited to 'elo.py')
-rwxr-xr-x | elo.py | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -1,10 +1,12 @@ #!/usr/bin/env python +import argparse +import datetime + +import dateutil.parser +import dateutil.relativedelta from f1elo.db import Session -from f1elo.model import * from f1elo.elo import Elo -import dateutil.parser, dateutil.relativedelta -import datetime -import argparse +from f1elo.model import * session = Session() elo = Elo(session) @@ -82,6 +84,7 @@ if len(rankings): if not drivers.has_key(ranking.driver): drivers[ranking.driver] = ranking.driver.get_ranking(date) + for rank in sorted(drivers.values(), key=lambda rank: rank.ranking, reverse=True): print rank else: |