예제 #1
0
파일: core.py 프로젝트: timwang-ai/pyusb
    def langids(self):
        """ Return the USB device's supported language ID codes.

        These are 16-bit codes familiar to Windows developers, where for
        example instead of en-US you say 0x0409. USB_LANGIDS.pdf on the usb.org
        developer site for more info. String requests using a LANGID not
        in this array should not be sent to the device.

        This property will cause some USB traffic the first time it is accessed
        and cache the resulting value for future use.
        """
        if self._langids is None:
            try:
                self._langids = util.get_langids(self)
            except USBError:
                self._langids = ()
        return self._langids
예제 #2
0
    def langids(self):
        """ Return the USB device's supported language ID codes.

        These are 16-bit codes familiar to Windows developers, where for
        example instead of en-US you say 0x0409. USB_LANGIDS.pdf on the usb.org
        developer site for more info. String requests using a LANGID not
        in this array should not be sent to the device.

        This property will cause some USB traffic the first time it is accessed
        and cache the resulting value for future use.
        """
        if self._langids is None:
            try:
                self._langids = util.get_langids(self)
            except USBError:
                self._langids = ()
        return self._langids