MCPcopy Index your code
hub / github.com/python/cpython / run

Function run

Lib/pdb.py:2671–2684  ·  view source on GitHub ↗

Execute the *statement* (given as a string or a code object) under debugger control. The debugger prompt appears before any code is executed; you can set breakpoints and type continue, or you can step through the statement using step or next. The optional *globals* and *locals*

(statement, globals=None, locals=None)

Source from the content-addressed store, hash-verified

2669# Simplified interface
2670
2671def run(statement, globals=None, locals=None):
2672 """Execute the *statement* (given as a string or a code object)
2673 under debugger control.
2674
2675 The debugger prompt appears before any code is executed; you can set
2676 breakpoints and type continue, or you can step through the statement
2677 using step or next.
2678
2679 The optional *globals* and *locals* arguments specify the
2680 environment in which the code is executed; by default the
2681 dictionary of the module __main__ is used (see the explanation of
2682 the built-in exec() or eval() functions.).
2683 """
2684 Pdb().run(statement, globals, locals)
2685
2686def runeval(expression, globals=None, locals=None):
2687 """Evaluate the *expression* (given as a string or a code object)

Callers 2

runctxFunction · 0.70
testFunction · 0.70

Calls 2

PdbClass · 0.85
runMethod · 0.45

Tested by

no test coverage detected