#NEWLINE# def debugger( self , force = False ) : #NEWLINE# #INDENT# "Call up the pdb debugger if desired, always clean up the tb\n        reference.\n\n        Keywords:\n\n          - force(False): by default, this routine checks the instance call_pdb\n          flag and does not actually invoke the debugger if the flag is false.\n          The 'force' option forces the debugger to activate even if the flag\n          is false.\n\n        If the call_pdb flag is set, the pdb interactive debugger is\n        invoked. In all cases, the self.tb reference to the current traceback\n        is deleted to prevent lingering references which hamper memory\n        management.\n\n        Note that each call to pdb() does an 'import readline', so if your app\n        requires a special setup for the readline completers, you'll have to\n        fix that by hand after invoking the exception handler." #NEWLINE# if ( force or self . call_pdb ) : #NEWLINE# #INDENT# if ( self . pdb is None ) : #NEWLINE# #INDENT# self . pdb = debugger . Pdb ( self . color_scheme_table . active_scheme_name ) #NEWLINE# #UNINDENT# display_trap = DisplayTrap ( hook = sys . __displayhook__ ) #NEWLINE# with display_trap : #NEWLINE# #INDENT# self . pdb . reset ( ) #NEWLINE# if ( hasattr ( self , 'tb' ) and ( self . tb is not None ) ) : #NEWLINE# #INDENT# etb = self . tb #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# etb = self . tb = sys . last_traceback #NEWLINE# #UNINDENT# while ( ( self . tb is not None ) and ( self . tb . tb_next is not None ) ) : #NEWLINE# #INDENT# self . tb = self . tb . tb_next #NEWLINE# #UNINDENT# if ( etb and etb . tb_next ) : #NEWLINE# #INDENT# etb = etb . tb_next #NEWLINE# #UNINDENT# self . pdb . botframe = etb . tb_frame #NEWLINE# self . pdb . interaction ( self . tb . tb_frame , self . tb ) #NEWLINE# #UNINDENT# #UNINDENT# if hasattr ( self , 'tb' ) : #NEWLINE# #INDENT# del self . tb