def write(self, datagram):
        """
        Write the given data as a single datagram.

        @param datagram: The data that will make up the complete datagram to be
            written.
        @type datagram: L{bytes}
        """
        try:
            return self._system.write(self._fileno, datagram)
        except IOError as e:
            if e.errno == errno.EINTR:
                return self.write(datagram)
            raise

        Write the given data as a single datagram.

        @param datagram: The data that will make up the complete datagram to be
            written.
        @type datagram: L{bytes}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/pair/tuntap.py