In python 3 input is the equivalent of raw_input in python 2.
This fix is an enhancement to replace raw_input/input with
six.moves.input, which is compatible with both python 2 and python 3.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
import readline
+import six
+
from tensorflow.python.debug.cli import base_ui
from tensorflow.python.debug.cli import debugger_cli_common
readline.set_completer(self._readline_complete)
readline.parse_and_bind("tab: complete")
- # For Python 2-3 compatibility.
- try:
- self._input = raw_input
- except NameError:
- self._input = input
+ self._input = six.moves.input
def _readline_complete(self, text, state):
context, prefix, except_last_word = self._analyze_tab_complete_input(text)