ó
    Ö›‘hÐ  ã                  ó$  • S r SSKJr  SSKJr  SSKJrJr  SSKJ	r	J
r
  SSKJr  SSKJr  \" 5       r\" \R                   5       " S S	5      5       r\" \R$                  \R&                  \R(                  \R*                  5       " S
 S5      5       rg)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
é    )Úannotations)Úimplementer)Ú
interfacesÚprocess)Ú	IProtocolÚIReactorFDSet)ÚLogger)ÚFailurec                  ó   • \ rS rSrSrg)ÚPipeAddressé   © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__static_attributes__r   ó    Ú`C:\Users\psant\Downloads\Noiseback\school\venv\Lib\site-packages\twisted/internet/_posixstdio.pyr   r      s   † âr   r   c                  óÎ   • \ rS rSrSrSrSrSr   S       SS jjrS r	S r
S rS rS	 rS
 rSS jrSS jrS rSS jrSS jrS rS rS rS rS rS rS rS rS rSrg)Ú
StandardIOé   NFc                ó   • Uc  SSK Jn  Xl        [        R                  " X@SU5      U l        [        R                  " X@SU5      U l        U R                  R                  5         U R                  R                  U 5        g )Nr   )ÚreactorÚwriteÚread)
Útwisted.internetr   Úprotocolr   ÚProcessWriterÚ_writerÚProcessReaderÚ_readerÚstartReadingÚmakeConnection)ÚselfÚprotoÚstdinÚstdoutr   s        r   Ú__init__ÚStandardIO.__init__*   s_   € ð ‰?Ý0Ø#(Œä×,Ò,¨W¸GÀVÓLˆŒÜ×,Ò,¨W¸FÀEÓJˆŒØ�‰×!Ñ!Ô#Ø�‰×$Ñ$ TÕ*r   c                óT   • U R                   b  U R                   R                  5         g g ©N)r    ÚloseConnection©r%   s    r   ÚloseWriteConnectionÚStandardIO.loseWriteConnection=   ó!   € Ø�<‰<Ñ#Ø�L‰L×'Ñ'Õ)ð $r   c                óV   • U R                   b  U R                   R                  U5        g g r,   )r    r   ©r%   Údatas     r   r   ÚStandardIO.writeA   s#   € Ø�<‰<Ñ#Ø�L‰L×Ñ˜tÕ$ð $r   c                óV   • U R                   b  U R                   R                  U5        g g r,   )r    ÚwriteSequencer3   s     r   r7   ÚStandardIO.writeSequenceE   s#   € Ø�<‰<Ñ#Ø�L‰L×&Ñ& tÕ,ð $r   c                ó°   • SU l         U R                  b  U R                  R                  5         U R                  b  U R                  R	                  5         g g )NT)Údisconnectingr    r-   r"   ÚstopReadingr.   s    r   r-   ÚStandardIO.loseConnectionI   sC   € Ø!ˆÔà�<‰<Ñ#Ø�L‰L×'Ñ'Ô)Ø�<‰<Ñ#à�L‰L×$Ñ$Õ&ð $r   c                ó   • [        5       $ r,   ©r   r.   s    r   ÚgetPeerÚStandardIO.getPeerR   ó
   € Ü‹}Ðr   c                ó   • [        5       $ r,   r>   r.   s    r   ÚgetHostÚStandardIO.getHostU   rA   r   c                ó:   • U R                   R                  U5        g r,   )r   ÚdataReceived)r%   Úfdr4   s      r   ÚchildDataReceivedÚStandardIO.childDataReceivedY   s   € Ø�‰×"Ñ" 4Õ(r   c                óz   • U R                   (       a  g US:X  a  U R                  U5        g U R                  U5        g )Nr   )ÚdisconnectedÚ_readConnectionLostÚ_writeConnectionLost)r%   rG   Úreasons      r   ÚchildConnectionLostÚStandardIO.childConnectionLost\   s1   € Ø××ØØ�‹<Ø×$Ñ$ VÕ,à×%Ñ% fÕ-r   c                ó˜  • SU l         U R                  nU R                  nU R                  nS =U l        U l        S U l        Ub"  UR                   (       d  UR	                  U5        Ub"  UR                   (       d  UR	                  U5        [
        R                  S5         UR	                  U5        S S S 5        g ! , (       d  f       g = f)NTz#while calling stdio connectionLost:)rK   r"   r    r   ÚconnectionLostÚ_logÚfailuresHandled)r%   rN   r"   r    r   s        r   rR   ÚStandardIO.connectionLostd   sž   € Ø ˆÔð —,‘,ˆØ—,‘,ˆØ—=‘=ˆØ&*Ð*ˆŒ�t”|ØˆŒàÑ w×';×';Ø×"Ñ" 6Ô*àÑ w×';×';Ø×"Ñ" 6Ô*ä×!Ñ!Ð"GÕHØ×#Ñ# FÔ+÷ I×HÖHús   Â B;Â;
C	c                ó‚  • S U l         U R                  (       a  U R                  U5        g [        R                  " U R
                  S 5      nU(       a\  [        R                  S5       nUR                  5         S S S 5        WR                  (       a  U R                  UR                  5        g g g ! , (       d  f       N== f)Nz(while calling stdio writeConnectionLost:)r    r:   rR   r   ÚIHalfCloseableProtocolr   rS   rT   ÚwriteConnectionLostÚfailedÚfailure)r%   rN   ÚpÚwcls       r   rM   ÚStandardIO._writeConnectionLostw   s‘   € ØˆŒØ××Ø×Ñ Ô'Øä×-Ò-¨d¯m©m¸TÓBˆÞÜ×%Ñ%Ø:ôàØ×%Ñ%Ô'÷ð �z�zØ×#Ñ# C§K¡KÕ0ð ð ÷õ ús   Á(B0Â0
B>c                ó^  • S U l         [        R                  " U R                  S 5      nU(       a\  [        R                  S5       nUR                  5         S S S 5        WR                  (       a  U R                  UR                  5        g g U R                  U5        g ! , (       d  f       NN= f)Nz'while calling stdio readConnectionLost:)
r"   r   rW   r   rS   rT   ÚreadConnectionLostrY   rR   rZ   )r%   rN   r[   Úrcls       r   rL   ÚStandardIO._readConnectionLost†   s~   € ØˆŒÜ×-Ò-¨d¯m©m¸TÓBˆÞÜ×%Ñ%Ð&OÔPÐTWØ×$Ñ$Ô&÷ Qà�z�zØ×#Ñ# C§K¡KÕ0ð ð ×Ñ Õ'÷ QÕPús   ÁBÂ
B,c                óv   • U R                   c  UR                  5         g U R                   R                  X5        g r,   )r    ÚstopProducingÚregisterProducer)r%   ÚproducerÚ	streamings      r   rd   ÚStandardIO.registerProducer’   s*   € Ø�<‰<ÑØ×"Ñ"Õ$à�L‰L×)Ñ)¨(Õ>r   c                óT   • U R                   b  U R                   R                  5         g g r,   )r    ÚunregisterProducerr.   s    r   ri   ÚStandardIO.unregisterProducer˜   s!   € Ø�<‰<Ñ#Ø�L‰L×+Ñ+Õ-ð $r   c                ó$   • U R                  5         g r,   )r-   r.   s    r   rc   ÚStandardIO.stopProducing�   s   € Ø×ÑÕr   c                óT   • U R                   b  U R                   R                  5         g g r,   )r"   ÚpauseProducingr.   s    r   rn   ÚStandardIO.pauseProducing    r1   r   c                óT   • U R                   b  U R                   R                  5         g g r,   )r"   ÚresumeProducingr.   s    r   rq   ÚStandardIO.resumeProducing¤   s!   € Ø�<‰<Ñ#Ø�L‰L×(Ñ(Õ*ð $r   c                ó$   • U R                  5         g)z3Compatibility only, don't use. Call pauseProducing.N)rn   r.   s    r   r;   ÚStandardIO.stopReading¨   s   € à×ÑÕr   c                ó$   • U R                  5         g)z4Compatibility only, don't use. Call resumeProducing.N)rq   r.   s    r   r#   ÚStandardIO.startReading¬   s   € à×ÑÕr   c                ó   • [        5       er,   ©ÚNotImplementedError©r%   rN   s     r   r_   ÚStandardIO.readConnectionLost°   ó   € ä!Ó#Ð#r   c                ó   • [        5       er,   rx   rz   s     r   rX   ÚStandardIO.writeConnectionLost´   r|   r   )r"   r    rK   r:   r   )r   é   N)r&   r   r'   Úintr(   r€   r   zIReactorFDSet | None)rG   Ústrr4   ÚbytesÚreturnÚNone)rG   r�   rN   r
   rƒ   r„   )rN   r
   rƒ   r„   )r   r   r   r   r"   r    rK   r:   r)   r/   r   r7   r-   r?   rC   rH   rO   rR   rM   rL   rd   ri   rc   rn   rq   r;   r#   r_   rX   r   r   r   r   r   r      s²   † ð €GØ€GØ€LØ€Mð
 ØØ(,ð+àð+ð ð+ð ð	+ð
 &õ+ò&*ò%ò-ò'òòô)ô.ò,ô&1ô	(ò?ò.ò
ò*ò+òòò$õ$r   r   N)Ú__doc__Ú
__future__r   Úzope.interfacer   r   r   r   Útwisted.internet.interfacesr   r   Útwisted.loggerr	   Útwisted.python.failurer
   rS   ÚIAddressr   Ú
ITransportÚ	IProducerÚ	IConsumerÚIHalfCloseableDescriptorr   r   r   r   Ú<module>r�      sŽ   ðñ	õ #å &ç 0ß @Ý !Ý *áƒx€ñ ˆZ× Ñ Ó!÷	ð 	ó "ð	ñ Ø×ÑØ×ÑØ×ÑØ×'Ñ'ó	÷R$ð R$óñR$r   