code: def do_interact(self, arg):
          
          ns = self.curframe.f_globals.copy()
          ns.update(self.curframe_locals)
          code.interact("*interactive*", local=ns)
docs: interact
  
          Start an interative interpreter whose global namespace
          contains all the names found in the current scope.