diff options
author | emkael <emkael@tlen.pl> | 2016-10-10 13:19:25 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-10-10 13:36:16 +0200 |
commit | ac6d5ebbed923ec7e3ded5c97d55ad2c0ac14f99 (patch) | |
tree | d1d9aacfdafce467d9dbcb78524a531b9e134890 | |
parent | 802a205e100b0ab826d56a9091b41a710ec71539 (diff) |
alias raw_input() as input() for python2
-rwxr-xr-x | ql/console.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ql/console.py b/ql/console.py index 0c741ca..dede956 100755 --- a/ql/console.py +++ b/ql/console.py @@ -22,6 +22,12 @@ class Console(object): lineup = self.get_lineup(table)
print(lineup.info)
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:
|