Server : LiteSpeed
System : Linux server64.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User : nimalaab ( 3358)
PHP Version : 8.1.32
Disable Function : NONE
Directory :  /opt/alt/python313/lib64/python3.13/_pyrepl/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/alt/python313/lib64/python3.13/_pyrepl/__pycache__/base_eventqueue.cpython-313.opt-1.pyc
�

�dYh���L�SrSSKJr SSKJr SSKJr SSKJr "SS5rg	)
zv
OS-independent base for an event and VT sequence scanner

See unix_eventqueue and windows_eventqueue for subclasses.
�)�deque�)�keymap)�Event)�tracec��\rSrSrS\S\\\4SS4SjrS\S-4Sjr	S\
4SjrS\4S	jr
S
\SS4SjrS\\-SS4S
jrSrg)�BaseEventQueue�!�encoding�keymap_dict�returnNc���[R"U5UlURUl[SURS9 Xl[5Ul[5Ulg)Nzkeymap {k!r}��k)	r�compile_keymap�compiled_keymaprrr�events�	bytearray�buf)�selfrrs   �>/opt/alt/python313/lib64/python3.13/_pyrepl/base_eventqueue.py�__init__�BaseEventQueue.__init__"sG��%�4�4�[�A����*�*���
�n����,� �
�$)�G����;���c�Z�UR(aURR5$g)z*
Retrieves the next event from the queue.
N)r�popleft�rs r�get�BaseEventQueue.get*s!���;�;��;�;�&�&�(�(�rc�$�UR(+$)z
Checks if the queue is empty.
)rrs r�empty�BaseEventQueue.empty3s���;�;��rc�<�URn[5UlU$)z.
Flushes the buffer and returns its contents.
)rr)r�olds  r�	flush_buf�BaseEventQueue.flush_buf9s���h�h���;����
r�eventc�N�[SUS9 URRU5 g)z"
Inserts an event into the queue.
zadded event {event})r'N)rr�append)rr's  r�insert�BaseEventQueue.insertAs!��	�#�5�1������5�!r�charc	���[U[5(aUO
[U5nUR5nURRU5 XR;a�URURLaURUn[SUS9 [U[5(aX0lg
UR[SX0R555 URUlg
UR(a�URSS:Xam[S5 URUlUR[SS[S555 UR5S	S
HnURU5 M g
[UR5R!UR"5nUR[SXPR555 URUlg
![$a g
f=f)zQ
Processes a character by updating the buffer and handling special key mappings.
zfound map {k!r}r�keyr�z,unrecognized escape sequence, propagating...��rN)�
isinstance�int�ord�to_bytesrr)rrr�dictr*rr%r�push�bytes�decoder�UnicodeError)rr,�ord_charr�_c�decodeds      rr7�BaseEventQueue.pushHss��
&�d�C�0�0�4�c�$�i��� � �"��������!��;�;���{�{�d�2�2�2����D�!�A��#�q�)��!�T�"�"������E�%��N�N�,<�=�>�"�2�2���
�X�X�$�(�(�1�+��+�
�@�A��.�.�D�K��K�K��e�V�Y�w�-?�@�A��n�n�&�q�r�*���	�	�"�
�+�
E�����/�0�0����?�����E�%��.�.�2B�C�D��.�.�D�K��	 �
��
�s�8.G!�!
G.�-G.)rrrrr)�__name__�
__module__�__qualname__�__firstlineno__�strr6r8rrr�boolr!rr%r*r3r7�__static_attributes__�rrr	r	!sw�����4��s�
�3C�����U�T�\���t���9��"�E�"�d�"�&/��u��&/��&/rr	N)	�__doc__�collectionsr�r�consolerrr	rFrr�<module>rKs$��*�����M/�M/r

F1le Man4ger