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)
| 2669 | # Simplified interface |
| 2670 | |
| 2671 | def 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 | |
| 2686 | def runeval(expression, globals=None, locals=None): |
| 2687 | """Evaluate the *expression* (given as a string or a code object) |