def flags(self, flags): """Set file descriptor's flags (fcntl.F_SETFL)""" fcntl.fcntl(self.fd, fcntl.F_SETFL, int(flags))
def flags(self): """Get file descriptor's flags (fcntl.F_GETFL)""" return int(fcntl.fcntl(self.fd, fcntl.F_GETFL))