code: def win32_refresh_window(cls):
          
          # Get console handle
          handle = windll.kernel32.GetConsoleWindow()
  
          RDW_INVALIDATE = 0x0001
          windll.user32.RedrawWindow(handle, None, None, c_uint(RDW_INVALIDATE))
docs: Call win32 API to refresh the whole Window.
  
          This is sometimes necessary when the application paints background
          for completion menus. When the menu disappears, it leaves traces due
          to a bug in the Windows Console. Sending a repaint request solves it.