def write(self, writeBuffer):
        if ON_WINDOWS:
            pass
        else:
            if self.handle is None:
                raise U12Exception("The U12's handle is None. Please open a U12 with open()")
            
            if self.debug: print("Writing:", hexWithoutQuotes(writeBuffer))
            newA = (ctypes.c_byte*len(writeBuffer))(0) 
            for i in range(len(writeBuffer)):
                newA[i] = ctypes.c_byte(writeBuffer[i])
            
            writeBytes = staticLib.LJUSB_Write(self.handle, ctypes.byref(newA), len(writeBuffer))
            
            if(writeBytes != len(writeBuffer)):
                raise U12Exception( "Could only write %s of %s bytes." % (writeBytes, len(writeBuffer) ) )
                
            return writeBuffer
dataset/ETHPy150Open LabPy/lantz/lantz/drivers/labjack/_internal/u12.py/U12.write/original