(self, timeout, interval = 0.1)
return length != 0
a poor man's version of select()
a poor man's version of select()
a poor man s version of select ()
def poll(self, timeout, interval = 0.1):
        """a poor man's version of select()"""
        if timeout is None:
            timeout = maxint
        length = 0
        tmax = time.time() + timeout
        try:
            while length == 0:
                length = win32pipe.PeekNamedPipe(self.incoming, 0)[1]
                if time.time() >= tmax:
                    break
                time.sleep(interval)
        except TypeError:
            ex = sys.exc_info()[1]
            if not self.closed:
                raise
            raise EOFError(ex)
        return length != 0
def poll ( self , timeout , interval = 0.1 ) : if timeout is None : timeout = maxint length = 0 tmax = time . time ( ) + timeout try : while length == 0 : length = win32pipe . PeekNamedPipe ( self . incoming , 0 ) [ 1 ] if time . time ( ) >= tmax : break time . sleep ( interval ) except TypeError : ex = sys . exc_info ( ) [ 1 ] if not self . closed : raise raise EOFError ( ex ) return length != 0