Current File : //proc/self/root/lib/python3/dist-packages/twisted/internet/__pycache__/_posixstdio.cpython-312.pyc |
�
Ϫ�f� � � � d Z ddlmZ ddlmZmZmZ ddlmZm Z eej � G d� d� � Z eej ej ej ej � G d� 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 � � e Zd Zy)�PipeAddressN)�__name__�
__module__�__qualname__� � �>/usr/lib/python3/dist-packages/twisted/internet/_posixstdio.pyr
r
s � �r r
c � � e Zd ZdZdZdZdZdd�Zd� Zd� Z d� Z
d� Zd� Zd � Z
d
� Zd� Zd� Zd
� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zy)�
StandardIONFc � � |�ddl m} || _ t j || d|� | _ t j || d|� | _ | j j � | j j | � y )Nr )�reactor�write�read)
�twisted.internetr �protocolr �
ProcessWriter�_writer�
ProcessReader�_reader�startReading�makeConnection)�self�proto�stdin�stdoutr s r �__init__zStandardIO.__init__% sc � ��?�0���
��,�,�W�d�G�V�L����,�,�W�d�F�E�J������!�!�#��
�
�$�$�T�*r c �R � | j �| j j � y y �N)r �loseConnection�r s r �loseWriteConnectionzStandardIO.loseWriteConnection2 �! � ��<�<�#��L�L�'�'�)� $r c �T � | j �| j j |� y y r% )r r �r �datas r r zStandardIO.write6 s# � ��<�<�#��L�L���t�$� $r c �T � | j �| j j |� y y r% )r �
writeSequencer+ s r r. zStandardIO.writeSequence: s# � ��<�<�#��L�L�&�&�t�,� $r c � � d| _ | j �| j j � | j �| j j � y y �NT)�
disconnectingr r&