Commit 1e61ef14 authored by Stefan Behnel's avatar Stefan Behnel

make raw_input() usage compatible with Py2/Py3

parent 0ba77ca3
......@@ -4,6 +4,11 @@ GDB extension that adds Cython support.
from __future__ import print_function
try:
input = raw_input
except NameError:
pass
import sys
import textwrap
import traceback
......@@ -799,7 +804,7 @@ class CyBreak(CythonCommand):
while True:
try:
result = raw_input(
result = input(
"Select a function, press 'a' for all "
"functions or press 'q' or '^D' to quit: ")
except EOFError:
......
......@@ -45,6 +45,12 @@ the type names are known to the debugger
The module also extends gdb with some python-specific commands.
'''
try:
input = raw_input
except NameError:
pass
import os
import re
import sys
......@@ -2549,7 +2555,7 @@ class PyExec(gdb.Command):
lines = []
while True:
try:
line = raw_input('>')
line = input('>')
except EOFError:
break
else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment