def can_read(self, timeout=0):
    "Poll the socket to see if there's data that can be read."
    sock = self._sock
    if (not sock):
        self.connect()
        sock = self._sock
    return (self._parser.can_read() or bool(select([sock], [], [], timeout)[0]))
Poll the socket to see if there's data that can be read.
def can_read(self, timeout=0):
    
    sock = self._sock
    if (not sock):
        self.connect()
        sock = self._sock
    return (self._parser.can_read() or bool(select([sock], [], [], timeout)[0]))