HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/twisted/test/__pycache__/stdio_test_producer.cpython-310.pyc
o

�b��@s�dZddlZddlmZmZddlmZmZGdd�dej�Z	e
dkr?e�ejd��
�dd	lmZe�e	��e��dSdS)
z�
Main program for the child process run by
L{twisted.test.test_stdio.StandardInputOutputTests.test_producer} to test
that process transports implement IProducer properly.
�N)�protocol�stdio)�log�reflectc@s4eZdZdZdZdd�Zdd�Zdd�Zd	d
�ZdS)�
ProducerChildF�cCst�d�t�dtj�dS)Nz*****OVER*****�)r�msg�reactor�	callLater�stop)�self�reason�r�B/usr/lib/python3/dist-packages/twisted/test/stdio_test_producer.py�connectionLosts
zProducerChild.connectionLostcCsj|j|7_|jrt�tj�t�d�|j��dS|j�	|�|j�
d�r/|j��dS|��dS)Nz$dataReceived while transport paused!s
0
)�buf�_pausedr�startLogging�sys�stderrr	�	transport�loseConnection�write�endswith�pause)r
�datarrr�dataReceiveds
zProducerChild.dataReceivedcCs"d|_|j��t�d|j�dS)NTg{�G�z�?)rr�pauseProducingr
r�unpause�r
rrrr's
zProducerChild.pausecCsd|_|j��dS)NF)rr�resumeProducingr rrrr,szProducerChild.unpauseN)	�__name__�
__module__�__qualname__rrrrrrrrrrrs
r�__main__r)r
)�__doc__r�twisted.internetrr�twisted.pythonrr�Protocolrr"�namedAny�argv�installr
�
StandardIO�runrrrr�<module>s�