mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
GH-102895 Add an option local_exit in code.interact to block exit() from terminating the whole process (GH-102896)
This commit is contained in:
parent
cb1bf89c40
commit
e6eb8cafca
5 changed files with 114 additions and 33 deletions
|
|
@ -1741,7 +1741,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
|
|||
contains all the (global and local) names found in the current scope.
|
||||
"""
|
||||
ns = {**self.curframe.f_globals, **self.curframe_locals}
|
||||
code.interact("*interactive*", local=ns)
|
||||
code.interact("*interactive*", local=ns, local_exit=True)
|
||||
|
||||
def do_alias(self, arg):
|
||||
"""alias [name [command]]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue