use new "single" compile option

This commit is contained in:
Guido van Rossum 1995-08-07 20:16:05 +00:00
parent b7677095d4
commit ec8fd94aab
1 changed files with 2 additions and 1 deletions

View File

@ -74,8 +74,9 @@ class Pdb(bdb.Bdb, cmd.Cmd):
locals = self.curframe.f_locals
globals = self.curframe.f_globals
globals['__privileged__'] = 1
code = compile(line + '\n', '<stdin>', 'single')
try:
exec(line + '\n', globals, locals)
exec code in globals, locals
except:
if type(sys.exc_type) == type(''):
exc_type_name = sys.exc_type