def set_attached_console_visible(state):
 flag = {True: SW_SHOW, False: SW_HIDE}
 return bool(ShowWindow(console_window_handle, flag[state]))

def set_attached_console_visible ( state ) : flag = { True : SW_SHOW , False : SW_HIDE } return bool ( ShowWindow ( console_window_handle , flag [ state ] ) )
show/hide system console window attached to current process .