diff options
| author | Stefan Behnel <stefan_ml@behnel.de> | 2015-07-25 14:48:30 +0200 |
|---|---|---|
| committer | Stefan Behnel <stefan_ml@behnel.de> | 2015-07-25 14:48:30 +0200 |
| commit | 1e61ef148ea1287c95d0cb713360b4d5895eb861 (patch) | |
| tree | 11cc9bf7b01cfe05957552564fbb3202c6860419 /Cython/Debugger/libpython.py | |
| parent | 0ba77ca3704e4a870f957c752a275a3d2a12562b (diff) | |
| download | cython-1e61ef148ea1287c95d0cb713360b4d5895eb861.tar.gz | |
make raw_input() usage compatible with Py2/Py3
Diffstat (limited to 'Cython/Debugger/libpython.py')
| -rw-r--r-- | Cython/Debugger/libpython.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Cython/Debugger/libpython.py b/Cython/Debugger/libpython.py index cab1a9183..9c7439491 100644 --- a/Cython/Debugger/libpython.py +++ b/Cython/Debugger/libpython.py @@ -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: |
