'Output the given string over the serial port.'

def write(self, data):

    if (not self.sPort):
        raise portNotOpenError
    if (not isinstance(data, (bytes, bytearray))):
        raise TypeError(('expected    %s    or    bytearray,    got    %s' % (bytes, type(data))))
    self._outstream.write(data)
    return len(data)
