def run(self, cmd, start_opts=None, globals_=None, locals_=None):
if globals_ is None:<EOL><INDENT>globals_ = globals()<EOL><DEDENT>if locals_ is None:<EOL><INDENT>locals_ = globals_<EOL><DEDENT>if not isinstance(cmd, types.CodeType):<EOL><INDENT>self.eval_string = cmd<EOL>cmd = cmd+'<STR_LIT:\n>'<EOL>pass<EOL><DEDENT>retval = None<EOL>self.core.start(start_opts)<EOL>try:<EOL><INDENT>retval = eval(cmd, globals_, locals_)<EOL><DEDENT>except SyntaxError:<EOL><INDENT>try:<EOL><INDENT>exec(cmd, globals_, locals_)<EOL><DEDENT>except DebuggerQuit:<EOL><INDENT>pass<EOL><DEDENT>except DebuggerQuit:<EOL><INDENT>pass<EOL><DEDENT>pass<EOL><DEDENT>except DebuggerQuit:<EOL><INDENT>pass<EOL><DEDENT>finally:<EOL><INDENT>self.core.stop()<EOL><DEDENT>return retval<EOL>
Run debugger on string `cmd' using builtin function eval
        and if that builtin exec.  Arguments `globals_' and `locals_'
        are the dictionaries to use for local and global variables. By
        default, the value of globals is globals(), the current global
        variables. If `locals_' is not given, it becomes a copy of
        `globals_'.

        Debugger.core.start settings are passed via optional
        dictionary `start_opts'. Overall debugger settings are in
        Debugger.settings which changed after an instance is created
        . Also see `run_eval' if what you want to run is an
        run_eval'able expression have that result returned and
        `run_call' if you want to debug function run_call.