code: def complete_wrap(self, func, *args, **kwargs):
          
          # Workaround readline's one-time-read of terminal width.
          termcols = shutil.get_terminal_size()[0]
          readline.parse_and_bind('set completion-display-width %d' % termcols)
          try:
              return func(*args, **kwargs)
          except:
              traceback.print_exc()
              raise
docs: Readline eats exceptions raised by completer functions.