MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / default

Method default

tools/python-3.11.9-amd64/Lib/pdb.py:430–449  ·  view source on GitHub ↗
(self, line)

Source from the content-addressed store, hash-verified

428 self.message(repr(obj))
429
430 def default(self, line):
431 if line[:1] == '!': line = line[1:]
432 locals = self.curframe_locals
433 globals = self.curframe.f_globals
434 try:
435 code = compile(line + '\n', '<stdin>', 'single')
436 save_stdout = sys.stdout
437 save_stdin = sys.stdin
438 save_displayhook = sys.displayhook
439 try:
440 sys.stdin = self.stdin
441 sys.stdout = self.stdout
442 sys.displayhook = self.displayhook
443 exec(code, globals, locals)
444 finally:
445 sys.stdout = save_stdout
446 sys.stdin = save_stdin
447 sys.displayhook = save_displayhook
448 except:
449 self._error_exc()
450
451 def precmd(self, line):
452 """Handle alias expansion and ';;' separator."""

Callers

nothing calls this directly

Calls 2

_error_excMethod · 0.95
compileFunction · 0.70

Tested by

no test coverage detected