Set quitting attribute to True. Raises BdbQuit exception in the next call to a dispatch_*() method.
bdb/Bdb.set_quit
Bdb.set_quit