def non_polling_read(self, read_length, timeout):
    data = ''
    bytes_left = read_length
    while (bytes_left > 0):
        try:
            (ready, _, _) = select.select([self._sock.fileno()], [], [], timeout)
            if (not ready):
                raise NetBIOSTimeout
            received = self._sock.recv(bytes_left)
            if (len(received) == 0):
                raise NetBIOSError('Error while reading from remote', ERRCLASS_OS, None)
            data = (data + received)
            bytes_left = (read_length - len(data))
        except select.error as ex:
            if ((ex[0] != errno.EINTR) and (ex[0] != errno.EAGAIN)):
                raise NetBIOSError('Error occurs while reading from remote', ERRCLASS_OS, ex[0])
    return data
def non_polling_read(self, read_length, timeout):
    data = 
    bytes_left = read_length
    while (bytes_left > 0):
        try:
            (ready, _, _) = select.select([self._sock.fileno()], [], [], timeout)
            if (not ready):
                raise NetBIOSTimeout
            received = self._sock.recv(bytes_left)
            if (len(received) == 0):
                raise NetBIOSError('Error while reading from remote', ERRCLASS_OS, None)
            data = (data + received)
            bytes_left = (read_length - len(data))
        except select.error as ex:
            if ((ex[0] != errno.EINTR) and (ex[0] != errno.EAGAIN)):
                raise NetBIOSError('Error occurs while reading from remote', ERRCLASS_OS, ex[0])
    return data