summaryrefslogtreecommitdiff
path: root/f1elo
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2014-10-23 16:25:31 +0200
committeremkael <emkael@tlen.pl>2014-10-23 16:25:31 +0200
commit9a976853f6953b42c3f78cf989e028522bc48772 (patch)
tree81412500b34c84c665b38dccd0a970a60cb18848 /f1elo
parent225a26908b0ea981d735d7db7118a4f8598c95d5 (diff)
* printing -v info to stderr
Diffstat (limited to 'f1elo')
-rw-r--r--f1elo/interface.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/f1elo/interface.py b/f1elo/interface.py
index 4b938ae..a077986 100644
--- a/f1elo/interface.py
+++ b/f1elo/interface.py
@@ -1,5 +1,8 @@
+from __future__ import print_function
+
import datetime
import dateutil.relativedelta
+import sys
from sqlalchemy import MetaData
@@ -28,7 +31,7 @@ class Interface:
for race in query.all():
race.ranked = False
if _debug:
- print race
+ print(race, file=sys.stderr)
query = self.session.query(Ranking)
if date is not None:
@@ -56,8 +59,8 @@ class Interface:
for race in races:
if _debug:
- print race
- print
+ print(race, file=sys.stderr)
+ print('', file=sys.stderr)
ranks = elo.rank_race(race)
driver_ranks = {}
@@ -76,8 +79,8 @@ class Interface:
if _debug:
for entry in race.entries:
- print entry, elo.get_entry_ranking(entry, race.date), elo.get_entry_ranking(entry)
- print
+ print(entry, elo.get_entry_ranking(entry, race.date), elo.get_entry_ranking(entry), file=sys.stderr)
+ print('', file=sys.stderr)
race.ranked = True
date = race.date