Hide the console cursor on the given stream

    :param stream: The name of the stream to get the handle for
    :return: None
    :rtype: None

def hide_cursor(stream=sys.stdout):
    """
    Hide the console cursor on the given stream

    :param stream: The name of the stream to get the handle for
    :return: None
    :rtype: None
    """

    handle = get_stream_handle(stream=stream)
    if os.name == "nt":
        from ctypes import windll

        cursor_info = CONSOLE_CURSOR_INFO()
        windll.kernel32.GetConsoleCursorInfo(handle, ctypes.byref(cursor_info))
        cursor_info.visible = False
        windll.kernel32.SetConsoleCursorInfo(handle, ctypes.byref(cursor_info))
    else:
        handle.write("\033[?25l")
        handle.flush()