
    k:il                     d    d Z dZddlZddlmZ ddlmZmZmZm	Z	 ddl
mZmZ 	 deeef   d	dfd
Zy)ab  
    pyte
    ~~~~

    `pyte` implements a mix of VT100, VT220 and VT520 specification,
    and aims to support most of the `TERM=linux` functionality.

    Two classes: :class:`~pyte.streams.Stream`, which parses the
    command stream and dispatches events for commands, and
    :class:`~pyte.screens.Screen` which, when used with a stream
    maintains a buffer of strings representing the screen of a
    terminal.

    .. warning:: From ``xterm/main.c`` "If you think you know what all
                 of this code is doing, you are probably very mistaken.
                 There be serious and nasty dragons here" -- nothing
                 has changed.

    :copyright: (c) 2011-2012 by Selectel.
    :copyright: (c) 2012-2017 by pyte authors and contributors,
                    see AUTHORS for details.
    :license: LGPL, see LICENSE for more details.
)Screen
DiffScreenHistoryScreenDebugScreenStream
ByteStream    N)Union   )r   r   r   r   )r   r   charsreturnc                    t        | t              r| j                  d      } t        j                         5 }t        t        |            j                  |        t        |j                                ddd       y# 1 sw Y   yxY w)zA :func:`dis.dis` for terminals.

        >>> dis(b"")       # doctest: +NORMALIZE_WHITESPACE
        ["bell", [], {}]
        >>> dis(b"[20m")   # doctest: +NORMALIZE_WHITESPACE
        ["select_graphic_rendition", [20], {}]
        zutf-8)toN)

isinstancestrencodeioStringIOr   r   feedprintgetvalue)r   bufs     D/var/www/html/bot/venv/lib/python3.12/site-packages/pyte/__init__.pydisr   $   sb     eS!LL)E[[] 	"c{c*+007#,,.!	" 	" 	"s   >A==B)__doc____all__r   typingr	   screensr   r   r   r   streamsr   r   bytesr   r        r   <module>r"      sC   0# 
  C C ' "5$ " "r!   