From 59aa918b4976d41c1d6161273551c30a93f198b2 Mon Sep 17 00:00:00 2001 From: Dougal Matthews Date: Wed, 7 Dec 2016 11:32:03 +0000 Subject: [PATCH] Use six.moves.input for Python 3 compatability Currently, without this, the YAQL repl will error under Python 3. Change-Id: I5c53f83a0cb069127e33ab629255b0178f272e62 --- yaql/cli/cli_functions.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/yaql/cli/cli_functions.py b/yaql/cli/cli_functions.py index cf21bfa..14ae64d 100644 --- a/yaql/cli/cli_functions.py +++ b/yaql/cli/cli_functions.py @@ -20,6 +20,8 @@ import re import readline import sys +import six + from yaql.language.exceptions import YaqlParsingException from yaql import __version__ as version @@ -47,8 +49,8 @@ def main(context, show_tokens, parser): comm = True while comm != 'exit': try: - comm = raw_input(PROMPT).decode(sys.stdin.encoding or - locale.getpreferredencoding(True)) + comm = six.moves.input(PROMPT).decode( + sys.stdin.encoding or locale.getpreferredencoding(True)) except EOFError: return if not comm: