summaryrefslogtreecommitdiff
path: root/ql/console.py
diff options
context:
space:
mode:
authorMichaƂ Zimniewicz <michzimny@users.noreply.github.com>2016-11-25 18:23:01 +0100
committerGitHub <noreply@github.com>2016-11-25 18:23:01 +0100
commit29b99d5e50af876141187c7bdf52d663f3ac0807 (patch)
tree8628229e4a90c60f966de097079b2261e503e07e /ql/console.py
parent0a27bbf9ce1f5b1a52bc62ff4d9e5c2f960b030c (diff)
parent70f771d2ab31847333b2c438466fe35895bc24db (diff)
Merge pull request #7 from michzimny/porting_to_python2
Porting to python2
Diffstat (limited to 'ql/console.py')
-rwxr-xr-xql/console.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/ql/console.py b/ql/console.py
index 0c741ca..6751b83 100755
--- a/ql/console.py
+++ b/ql/console.py
@@ -21,7 +21,13 @@ class Console(object):
def process_table(self, table):
lineup = self.get_lineup(table)
print(lineup.info)
- print()
+ print('')
+ # Python 2.x workaround
+ global input
+ try:
+ input = raw_input
+ except NameError:
+ pass # if raw_input is not defined (Python 3.x), ignore it
for team in lineup.teams:
Completer.install_new_completer(team.player_names)
for pair in team.pairs: