code: def set_attached_console_visible(state):
      
      flag = {True: SW_SHOW, False: SW_HIDE}
      return bool(ShowWindow(console_window_handle, flag[state]))
docs: Show/hide system console window attached to current process.
         Return it's previous state.
  
         Availability: Windows