%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3.12/test/support/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3.12/test/support/__pycache__/pty_helper.cpython-312.pyc

�

���f���h�dZddlZddlZddlZddlZddlmZddlmZddl	m
Z
d	d�ZGd�d�Zy)
z.
Helper to run a script in a pseudo-terminal.
�N)�	ExitStack)�EIO)�
import_modulec�~�td�}t�}|j�\}}tjd|f}tj|||||��}tj|�t�5}	|	j|�d�}
|	j|
|�|	jtj|�|	jtj��}|j|tjtj z�tj"|d�	|j%�D]�\}}
|
tjzr7	tj&|d�}|s
|ccddd�S|j/|�|
tj zs�d	|tj0||�d}|r��|j3|tj�����#t($r }|j*t,k7r�d}Yd}~��d}~wwxYw#t($r }|j*t,k7r�d}Yd}~�vd}~wwxYw#1swYyxYw)N�ptyz-c)�stdin�stdout�stderr�envc�D�	|j�y#t$rYywxYw�N)�	terminate�ProcessLookupError)�procs �./usr/lib/python3.12/test/support/pty_helper.pyrzrun_pty.<locals>.terminates#��
���� ��%�
��
�s��	�Fi�)r�	bytearray�openpty�sys�
executable�
subprocess�Popen�os�closer�
enter_context�callback�	selectors�SelectSelector�register�
EVENT_READ�EVENT_WRITE�set_blocking�select�read�OSError�errnor�extend�write�modify)�script�inputrr�output�master�slave�argsr�cleanupr�sel�_�events�chunk�errs                r�run_ptyr6
s���
��
�C�
�[�F��k�k�m�O�V�U��N�N�D�&�)�D����D��e�E�s�S�D��H�H�U�O�	��(A�����d�#�	�	����D�)�������6�*��#�#�I�$<�$<�$>�?�����V�Y�1�1�I�4I�4I�I�J�
�����&��"�z�z�|�
A���F��I�0�0�0�$� "����� 8��!�%�
�;(A�(A�<�M�M�%�(��I�1�1�1�$� %�b�h�h�v�u�&=�&>� ?��!��
�
�6�9�+?�+?�@�+
A���
#�$��9�9��+�!� #���	$��#�$��9�9��+�!� #���	$��E(A�(A�sm�5CH3�G�'H3�6$H3�H�5H3�8#H3�	H�$G?�:H3�?H�H3�	H0�H+�&H3�+H0�0H3�3H<c��eZdZdZd�Zd�Zy)�	FakeInputa
    A fake input stream for pdb's interactive debugger.  Whenever a
    line is read, print it (to simulate the user typing it), and then
    return it.  The set of lines to return is specified in the
    constructor; they should not have trailing newlines.
    c��||_yr
)�lines)�selfr:s  r�__init__zFakeInput.__init__Js	����
rc�X�|jjd�}t|�|dzS)Nr�
)r:�pop�print)r;�lines  r�readlinezFakeInput.readlineMs%���z�z�~�~�a� ��
�d���d�{�rN)�__name__�
__module__�__qualname__�__doc__r<rB�rrr8r8Cs����rr8)sdummy input
N)
rFrrrr�
contextlibrr&r�test.support.import_helperrr6r8rGrr�<module>rJs2���
���
� ��4�/A�l
�
r

Zerion Mini Shell 1.0