diff options
author | emkael <emkael@tlen.pl> | 2016-10-10 13:19:25 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-11-25 22:10:18 +0100 |
commit | ae7738768ead06aea4b93826c8e164da53eeba51 (patch) | |
tree | 9fe91a3a8899dbcc0b153998ed501545988ddbb5 | |
parent | ee4f35076b048162c87059d08425b6280776ec09 (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:
|