def __init__(self, hidDevice, vendor, product): ''' create the hid device wrapper hidDevice is a handle from the OS ''' HIDDevice.__init__(self, vendor, product) self.IOObjectRelease = IOObjectRelease # need to hold onto reference to release function self._hidDevice = hidDevice self._hidInterface = None
def __init__(self,device_path,vendor,product): HIDDevice.__init__(self,vendor,product) self._device_path=device_path self._device_handle=None self._CloseHandle=Kernel32.CloseHandle