'For easier use of the serial port instance with select.
WARNING: this function is not portable to different platforms!'

def fileno(self):

    if (not self.is_open):
        raise portNotOpenError
    return self.fd
