Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b4680f02
Commit
b4680f02
authored
Jan 15, 2008
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #1786 (by myself): pdb should use its own stdin/stdout around an
exec call and when creating a recursive instance.
parent
70ed3705
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
Lib/pdb.py
Lib/pdb.py
+8
-2
Misc/NEWS
Misc/NEWS
+5
-1
No files found.
Lib/pdb.py
View file @
b4680f02
...
...
@@ -199,7 +199,13 @@ class Pdb(bdb.Bdb, cmd.Cmd):
globals
=
self
.
curframe
.
f_globals
try
:
code
=
compile
(
line
+
'
\
n
'
,
'<stdin>'
,
'single'
)
exec
code
in
globals
,
locals
try
:
sys
.
stdin
=
self
.
stdin
sys
.
stdout
=
self
.
stdout
exec
code
in
globals
,
locals
finally
:
sys
.
stdout
=
save_stdout
sys
.
stdin
=
save_stdin
except
:
t
,
v
=
sys
.
exc_info
()[:
2
]
if
type
(
t
)
==
type
(
''
):
...
...
@@ -659,7 +665,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
sys
.
settrace
(
None
)
globals
=
self
.
curframe
.
f_globals
locals
=
self
.
curframe
.
f_locals
p
=
Pdb
()
p
=
Pdb
(
self
.
completekey
,
self
.
stdin
,
self
.
stdout
)
p
.
prompt
=
"(%s) "
%
self
.
prompt
.
strip
()
print
>>
self
.
stdout
,
"ENTERING RECURSIVE DEBUGGER"
sys
.
call_tracing
(
p
.
run
,
(
arg
,
globals
,
locals
))
...
...
Misc/NEWS
View file @
b4680f02
...
...
@@ -358,11 +358,15 @@ Core and builtins
- Bug #1664966: Fix crash in exec if Unicode filename can'
t
be
decoded
.
-
Issue
#
1537
:
Changed
GeneratorExit
's base class from Exception to BaseException.
-
Issue
#
1537
:
Changed
GeneratorExit
's base class from Exception to
BaseException.
Library
-------
- Issue #1786: pdb should use its own stdin/stdout around an exec call
and when creating a recursive instance.
- Issue #1698398 Zipfile.printdir() crashed because the format string
expected a tuple type of length six instead of time.struct_time object.
...
...
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