Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
1e61ef14
Commit
1e61ef14
authored
Jul 25, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make raw_input() usage compatible with Py2/Py3
parent
0ba77ca3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
Cython/Debugger/libcython.py
Cython/Debugger/libcython.py
+6
-1
Cython/Debugger/libpython.py
Cython/Debugger/libpython.py
+7
-1
No files found.
Cython/Debugger/libcython.py
View file @
1e61ef14
...
@@ -4,6 +4,11 @@ GDB extension that adds Cython support.
...
@@ -4,6 +4,11 @@ GDB extension that adds Cython support.
from
__future__
import
print_function
from
__future__
import
print_function
try
:
input
=
raw_input
except
NameError
:
pass
import
sys
import
sys
import
textwrap
import
textwrap
import
traceback
import
traceback
...
@@ -799,7 +804,7 @@ class CyBreak(CythonCommand):
...
@@ -799,7 +804,7 @@ class CyBreak(CythonCommand):
while
True
:
while
True
:
try
:
try
:
result
=
raw_
input
(
result
=
input
(
"Select a function, press 'a' for all "
"Select a function, press 'a' for all "
"functions or press 'q' or '^D' to quit: "
)
"functions or press 'q' or '^D' to quit: "
)
except
EOFError
:
except
EOFError
:
...
...
Cython/Debugger/libpython.py
View file @
1e61ef14
...
@@ -45,6 +45,12 @@ the type names are known to the debugger
...
@@ -45,6 +45,12 @@ the type names are known to the debugger
The module also extends gdb with some python-specific commands.
The module also extends gdb with some python-specific commands.
'''
'''
try
:
input
=
raw_input
except
NameError
:
pass
import
os
import
os
import
re
import
re
import
sys
import
sys
...
@@ -2549,7 +2555,7 @@ class PyExec(gdb.Command):
...
@@ -2549,7 +2555,7 @@ class PyExec(gdb.Command):
lines
=
[]
lines
=
[]
while
True
:
while
True
:
try
:
try
:
line
=
raw_
input
(
'>'
)
line
=
input
(
'>'
)
except
EOFError
:
except
EOFError
:
break
break
else
:
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment