Using Python, I am trying to write to a USB sensor using ioctl. I have loads of examples of reading from devices either directly or via pyusb, or simple file writes, but anything more complicated disappears off the radar. 
I need to use a control_transfer to write Feature Report message
The command is ioctl(devicehandle, Operation, Args)
The issue I have is determining the correct Operation. The Args, I believe should be a buffer containing the Feature Report for the device? plus a Mutable flag set to true
Any help or advice would be greatly received
I should add; the reason for using Python is the code must be device independent.
According to the documentation, ioctl() in the fcntl module is unix specific, so it will not work in Windows. There seems to be a Windows variant named DeviceIoControl()  that works similarly.
IOCTLs are declared by the device driver or operating system, so I very much doubt that there are IOCTL operations that have the same operation id (IOCTL number) and same parameters on different operating systems.
For Linux, you can check the header files for specific device drivers or possibly some usb core header file for valid IOCTLs.
Writing to USB device with Python using ioctl