ó õùPc@s‚dZddlZddlZddlZd„Zdefd„ƒYZdefd„ƒYZdefd „ƒYZd „Z dS( s Abstraction of a one-way pipe where the read end can be used in select(). Normally this is trivial, but Windows makes it nearly impossible. The pipe acts like an Event, which can be set or cleared. When set, the pipe will trigger as readable in select(). iÿÿÿÿNcCs,tjd dkrtƒ}n tƒ}|S(Nitwin(tsystplatformt PosixPipet WindowsPipe(tp((s(..\python\site-packages\paramiko\pipe.pyt make_pipe s  RcBs>eZd„Zd„Zd„Zd„Zd„Zd„ZRS(cCs7tjƒ\|_|_t|_t|_t|_dS(N(tostpipet_rfdt_wfdtFalset_sett_forevert_closed(tself((s(..\python\site-packages\paramiko\pipe.pyt__init__)s  cCs-tj|jƒtj|jƒt|_dS(N(RtcloseR R tTrueR(R((s(..\python\site-packages\paramiko\pipe.pyR/scCs|jS(N(R (R((s(..\python\site-packages\paramiko\pipe.pytfileno5scCs7|j s|jrdStj|jdƒt|_dS(Ni(R R RtreadR R (R((s(..\python\site-packages\paramiko\pipe.pytclear8scCs6|js|jrdSt|_tj|jdƒdS(Nt*(R RRRtwriteR (R((s(..\python\site-packages\paramiko\pipe.pytset>s cCst|_|jƒdS(N(RR R(R((s(..\python\site-packages\paramiko\pipe.pyt set_foreverDs (t__name__t __module__RRRRRR(((s(..\python\site-packages\paramiko\pipe.pyR(s      RcBsDeZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(s‡ On Windows, only an OS-level "WinSock" may be used in select(), but reads and writes must be to the actual socket object. cCs«tjtjtjƒ}|jdƒ|jdƒtjtjtjƒ|_|jjd|jƒdfƒ|jƒ\|_ }|j ƒt |_ t |_ t |_dS(Ns 127.0.0.1ii(s 127.0.0.1i(tsockettAF_INETt SOCK_STREAMtbindtlistent_rsocktconnectt getsocknametacceptt_wsockRR R R R(Rtservtaddr((s(..\python\site-packages\paramiko\pipe.pyRNs      cCs'|jjƒ|jjƒt|_dS(N(R!RR%RR(R((s(..\python\site-packages\paramiko\pipe.pyR]s  cCs |jjƒS(N(R!R(R((s(..\python\site-packages\paramiko\pipe.pyRcscCs4|j s|jrdS|jjdƒt|_dS(Ni(R R R!trecvR (R((s(..\python\site-packages\paramiko\pipe.pyRfscCs3|js|jrdSt|_|jjdƒdS(NR(R RRR%tsend(R((s(..\python\site-packages\paramiko\pipe.pyRls cCst|_|jƒdS(N(RR R(R((s(..\python\site-packages\paramiko\pipe.pyRrs ( RRt__doc__RRRRRR(((s(..\python\site-packages\paramiko\pipe.pyRIs     tOrPipecBs#eZd„Zd„Zd„ZRS(cCst|_d|_||_dS(N(R R tNonet_partnert_pipe(RR((s(..\python\site-packages\paramiko\pipe.pyRxs  cCs)t|_|jjs%|jjƒndS(N(RR R-R.R(R((s(..\python\site-packages\paramiko\pipe.pyR}s  cCs)t|_|jjs%|jjƒndS(N(R R R-R.R(R((s(..\python\site-packages\paramiko\pipe.pyR‚s  (RRRRR(((s(..\python\site-packages\paramiko\pipe.pyR+ws  cCs4t|ƒ}t|ƒ}||_||_||fS(sØ wraps a pipe into two pipe-like objects which are "or"d together to affect the real pipe. if either returned pipe is set, the wrapped pipe is set. when both are cleared, the wrapped pipe is cleared. (R+R-(Rtp1tp2((s(..\python\site-packages\paramiko\pipe.pyt make_or_pipeˆs     ( R*RRRRtobjectRRR+R1(((s(..\python\site-packages\paramiko\pipe.pyts    !.