Ϫf+ dZddlZddlZddlmZddlZddlmZmZddl m Z m Z m Z m Z mZddlmZee GddZeee e Gd d ej$Zy) zM Windows-specific implementation of the L{twisted.internet.stdio} interface. N) implementer) _pollingfilemain)IAddress IConsumerIHalfCloseableProtocol IPushProducer ITransport)Failurec eZdZy)Win32PipeAddressN)__name__ __module__ __qualname__>/usr/lib/python3/dist-packages/twisted/internet/_win32stdio.pyr r srr cteZdZdZdZddZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZy) StandardIOFNc|ddlm}tdddD]&}tj|t j (tjj||||_ tjtj}tjtj}tj||j |j"|_tj&||j(|_|j-|j$|j-|j*|jj/|y)z Start talking to standard IO with the given protocol. Also, put it stdin/stdout/stderr into binary mode. Nr)reactor)twisted.internetrrangemsvcrtsetmodeosO_BINARYr _PollingTimer__init__protowin32api GetStdHandleSTD_INPUT_HANDLESTD_OUTPUT_HANDLE_PollableReadPipe dataReceivedreadConnectionLoststdin_PollableWritePipewriteConnectionLoststdout_addPollableResourcemakeConnection)selfr"rstdfdhstdinhstdouts rr!zStandardIO.__init__$s ? 01a^ /E NN5"++ . / ""++D': &&x'@'@A''(B(BC!33 D%%t'>'>  #55gt?W?WX  !!$**- !!$++. !!$'rc:|jj|yN)r"r(r0datas rr(zStandardIO.dataReceivedAs %rctj|jr|jj|j yr5)r providedByr"r) checkConnLostr0s rr)zStandardIO.readConnectionLostDs0 ! , ,TZZ 8 JJ ) ) + rctj|jr|jj|j yr5)rr9r"r,r:r;s rr,zStandardIO.writeConnectionLostIs0 ! , ,TZZ 8 JJ * * , rrc|xjdz c_|jdk\rAd|_d|_|jj t t jyy)NrrT) connsLost disconnecting disconnectedr"connectionLostr rCONNECTION_DONEr;s rr:zStandardIO.checkConnLostPsN ! >>Q !%D  $D  JJ % %gd.B.B&C D rc:|jj|yr5)r-writer6s rrDzStandardIO.writeYs $rcX|jjdj|y)Nr)r-rDjoin)r0seqs r writeSequencezStandardIO.writeSequence\s #((3-(rczd|_|jj|jjy)NT)r?r*closer-r;s rloseConnectionzStandardIO.loseConnection_s*!  rctSr5r r;s rgetPeerzStandardIO.getPeerd !!rctSr5rMr;s rgetHostzStandardIO.getHostgrOrc:|jj||Sr5)r-registerProducer)r0producer streamings rrSzStandardIO.registerProducerls{{++Hi@@rc6|jjSr5)r-unregisterProducerr;s rrWzStandardIO.unregisterProduceros{{--//rc8|jjyr5)r* stopProducingr;s rrYzStandardIO.stopProducingvs   "rc8|jjyr5)r*pauseProducingr;s rr[zStandardIO.pauseProducing{s !!#rc8|jjyr5)r*resumeProducingr;s rr]zStandardIO.resumeProducing~s ""$rr5)rrrr?r@r!r(r)r,r>r:rDrHrKrNrQrSrWrYr[r]rrrrrs`ML(:&  IE ) "" A0# $%rr)__doc__rrzope.interfacerr#rrrtwisted.internet.interfacesrrrr r twisted.python.failurer r r rrrrrbsu  &/+ X    ZM2_%++_%3_%r