()
Determine if we have a console attached or are a GUI app.
Determine if we have a console attached or are a GUI app.
Determine if we have a console attached or are a GUI app .
def _has_console():
    """Determine if we have a console attached or are a GUI app."""
    try:
        return bool(_GetConsoleMode(HSTDOUT, byref(wintypes.DWORD())))
    except Exception as e:
        return False
def _has_console ( ) : try : return bool ( _GetConsoleMode ( HSTDOUT , byref ( wintypes . DWORD ( ) ) ) ) except Exception as e : return False