From ae7738768ead06aea4b93826c8e164da53eeba51 Mon Sep 17 00:00:00 2001 From: emkael Date: Mon, 10 Oct 2016 13:19:25 +0200 Subject: alias raw_input() as input() for python2 --- ql/console.py | 6 ++++++ 1 file changed, 6 insertions(+) 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: -- cgit v1.2.3