ϪfdZddlmZddlmZmZmZddlmZm Z eejGddZ eejejejejGddZy ) zStandard 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 interfacesprocess)failurelogc eZdZy) PipeAddressN)__name__ __module__ __qualname__>/usr/lib/python3/dist-packages/twisted/internet/_posixstdio.pyr r srr ceZdZdZdZdZdZddZdZdZ dZ dZ dZ d Z d Zd Zd Zd ZdZdZdZdZdZdZdZdZdZdZy) StandardIONFc|ddlm}||_tj||d||_tj ||d||_|jj|jj|y)Nr)reactorwriteread) twisted.internetrprotocolr ProcessWriter_writer ProcessReader_reader startReadingmakeConnection)selfprotostdinstdoutrs r__init__zStandardIO.__init__%sc ? 0 ,,WdGVL ,,WdFEJ  !!# $$T*rcR|j|jjyyN)rloseConnectionrs rloseWriteConnectionzStandardIO.loseWriteConnection2! << # LL ' ' ) $rcT|j|jj|yyr%)rrrdatas rrzStandardIO.write6s# << # LL  t $ $rcT|j|jj|yyr%)r writeSequencer+s rr.zStandardIO.writeSequence:s# << # LL & &t , $rcd|_|j|jj|j|jj yyNT) disconnectingrr&r stopReadingr's rr&zStandardIO.loseConnection>sC! << # LL ' ' ) << # LL $ $ & $rctSr%r r's rgetPeerzStandardIO.getPeerG }rctSr%r4r's rgetHostzStandardIO.getHostJr6rc:|jj|yr%)r dataReceived)rfdr,s rchildDataReceivedzStandardIO.childDataReceivedNs ""4(rc|jry|jjtjk(r)|dk(r|j |y|j |y|j|y)Nr) disconnectedvalue __class__rConnectionDone_readConnectionLost_writeConnectionLostconnectionLost)rr;reasons rchildConnectionLostzStandardIO.childConnectionLostQsW     << ! !U%9%9 9V|((0))&1    'rcjd|_|j}|j}|j}dx|_|_d|_||js|j |||js|j | |j |y#t $rt jYywxYwr0)r>rrrrD BaseExceptionrerr)rrErrrs rrDzStandardIO.connectionLost^s ,,,,==&** t|  w';';  " "6 *  w';';  " "6 *   # #F +  GGI sBB21B2cBd|_|jr|j|ytj|j d}|r |j yy#t$r:tj|jtjYywxYwr%) rr1rDrIHalfCloseableProtocolrwriteConnectionLostrHrrIrFailurerrEps rrCzStandardIO._writeConnectionLostss       '   - -dmmT B  7%%' ! 7 ##GOO$56 7s AABBc(d|_tj|jd}|r |j y|j|y#t $r:t j|jtjYywxYwr%) rrrKrreadConnectionLostrHrrIrDrrMrNs rrBzStandardIO._readConnectionLostsr  - -dmmT B  7$$&    ' ! 7 ##GOO$56 7sAABBcv|j|jy|jj||yr%)r stopProducingregisterProducer)rproducer streamings rrTzStandardIO.registerProducers, <<   " " $ LL ) )(I >rcR|j|jjyyr%)runregisterProducerr's rrXzStandardIO.unregisterProducers! << # LL + + - $rc$|jyr%)r&r's rrSzStandardIO.stopProducings rcR|j|jjyyr%)rpauseProducingr's rr[zStandardIO.pauseProducingr)rcR|j|jjyyr%)rresumeProducingr's rr]zStandardIO.resumeProducings! << # LL ( ( * $rc$|jy)z3Compatibility only, don't use. Call pauseProducing.N)r[r's rr2zStandardIO.stopReadings rc$|jy)z4Compatibility only, don't use. Call resumeProducing.N)r]r's rrzStandardIO.startReadings rctr%NotImplementedErrorrrEs rrQzStandardIO.readConnectionLost !##rctr%rarcs rrLzStandardIO.writeConnectionLostrdr)rN)r r r rrr>r1r#r(rr.r&r5r8r<rFrDrCrBrTrXrSr[r]r2rrQrLrrrrrsGGLM+*%-') (* 7 (? . *+$$rrN)__doc__zope.interfacerrrrrtwisted.pythonrrIAddressr ITransport IProducer IConsumerIHalfCloseableDescriptorrrrrros '77' Z !  "  ''  S$S$  S$r