Ñò
pØcJc @ s‚ d Z d d k Z d d k Z d d k Z d „ Z d e f d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d
„ Z d S( 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ÿÿÿÿNc C s. t i d d j o
t ƒ } n
t ƒ } | S( Ni t win( t syst platformt PosixPipet WindowsPipe( t p( ( s1 /usr/lib/python2.6/site-packages/paramiko/pipe.pyt make_pipe s
R c B s> e Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( c C s7 t i ƒ \ | _ | _ t | _ t | _ t | _ d S( N( t ost pipet _rfdt _wfdt Falset _sett _forevert _closed( t self( ( s1 /usr/lib/python2.6/site-packages/paramiko/pipe.pyt __init__) s c C s- t i | i ƒ t i | i ƒ t | _ d S( N( R t closeR R
t TrueR ( R ( ( s1 /usr/lib/python2.6/site-packages/paramiko/pipe.pyR / s c C s | i S( N( R ( R ( ( s1 /usr/lib/python2.6/site-packages/paramiko/pipe.pyt fileno5 s c C s: | i p
| i o d St i | i d ƒ t | _ d S( Ni ( R R
R t readR R ( R ( ( s1 /usr/lib/python2.6/site-packages/paramiko/pipe.pyt clear8 s c C s9 | i p
| i o d St | _ t i | i d ƒ d S( Nt *( R R R R t writeR
( R ( ( s1 /usr/lib/python2.6/site-packages/paramiko/pipe.pyt set> s c C s t | _ | i ƒ d S( N( R R
R ( R ( ( s1 /usr/lib/python2.6/site-packages/paramiko/pipe.pyt set_foreverD s ( t __name__t
__module__R R R R R R ( ( ( s1 /usr/lib/python2.6/site-packages/paramiko/pipe.pyR ( s R c B sD e Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( s‡
On Windows, only an OS-level "WinSock" may be used in select(), but reads
and writes must be to the actual socket object.
c C s« t i t i t i ƒ } | i d ƒ | i d ƒ t i t i t i ƒ | _ | i i d | i ƒ d f ƒ | i ƒ \ | _ } | i
ƒ t | _ t | _
t | _ d S( Ns 127.0.0.1i i ( s 127.0.0.1i ( t sockett AF_INETt SOCK_STREAMt bindt listent _rsockt connectt getsocknamet acceptt _wsockR R R R
R ( R t servt addr( ( s1 /usr/lib/python2.6/site-packages/paramiko/pipe.pyR N s
c C s' | i i ƒ | i i ƒ t | _ d S( N( R! R R% R R ( R ( ( s1 /usr/lib/python2.6/site-packages/paramiko/pipe.pyR ] s
c C s
| i i ƒ S( N( R! R ( R ( ( s1 /usr/lib/python2.6/site-packages/paramiko/pipe.pyR c s c C s7 | i p
| i o d S| i i d ƒ t | _ d S( Ni ( R R
R! t recvR ( R ( ( s1 /usr/lib/python2.6/site-packages/paramiko/pipe.pyR f s c C s6 | i p
| i o d St | _ | i i d ƒ d S( NR ( R R R R% t send( R ( ( s1 /usr/lib/python2.6/site-packages/paramiko/pipe.pyR l s c C s t | _ | i ƒ d S( N( R R
R ( R ( ( s1 /usr/lib/python2.6/site-packages/paramiko/pipe.pyR r s ( R R t __doc__R R R R R R ( ( ( s1 /usr/lib/python2.6/site-packages/paramiko/pipe.pyR I s t OrPipec B s# e Z d „ Z d „ Z d „ Z RS( c C s t | _ d | _ | | _ d S( N( R R t Nonet _partnert _pipe( R R ( ( s1 /usr/lib/python2.6/site-packages/paramiko/pipe.pyR x s c C s+ t | _ | i i p | i i ƒ n d S( N( R R R- R. R ( R ( ( s1 /usr/lib/python2.6/site-packages/paramiko/pipe.pyR } s
c C s+ t | _ | i i p | i i ƒ n d S( N( R R R- R. R ( R ( ( s1 /usr/lib/python2.6/site-packages/paramiko/pipe.pyR ‚ s
( R R R R R ( ( ( s1 /usr/lib/python2.6/site-packages/paramiko/pipe.pyR+ w s c C s4 t | ƒ } t | ƒ } | | _ | | _ | | f S( 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- ( R t p1t p2( ( s1 /usr/lib/python2.6/site-packages/paramiko/pipe.pyt make_or_pipeˆ s
(
R* R R R R t objectR R R+ R1 ( ( ( s1 /usr/lib/python2.6/site-packages/paramiko/pipe.pyt