(vendor_id, product_id)
return len(hid.enumerate(vendor_id, product_id)) > 0
Returns ``True`` if the given HID device is plugged to the computer.

    :param int vendor_id: The vendor id of the device (e.g. ``0x1038``)).
    :param int product_id: The product id of the device (e.g. ``0x1710``).

    :rtype: bool

    >>> from rivalcfg import usbhid
    >>> usbhid.is_device_plugged(0x1038, 0xbaad)
    False
Returns ``True`` if the given HID device is plugged to the computer.
Returns True if the given HID device is plugged to the computer .
def is_device_plugged(vendor_id, product_id):
    """Returns ``True`` if the given HID device is plugged to the computer.

    :param int vendor_id: The vendor id of the device (e.g. ``0x1038``)).
    :param int product_id: The product id of the device (e.g. ``0x1710``).

    :rtype: bool

    >>> from rivalcfg import usbhid
    >>> usbhid.is_device_plugged(0x1038, 0xbaad)
    False
    """
    if "RIVALCFG_PROFILE" in os.environ:
        debug_vendor_id = int(os.environ["RIVALCFG_PROFILE"].split(":")[0], 16)
        debug_product_id = int(os.environ["RIVALCFG_PROFILE"].split(":")[1], 16)
        if debug_vendor_id == vendor_id and debug_product_id == product_id:
            return True
    return len(hid.enumerate(vendor_id, product_id)) > 0
def is_device_plugged ( vendor_id , product_id ) : if "RIVALCFG_PROFILE" in os . environ : debug_vendor_id = int ( os . environ [ "RIVALCFG_PROFILE" ] . split ( ":" ) [ 0 ] , 16 ) debug_product_id = int ( os . environ [ "RIVALCFG_PROFILE" ] . split ( ":" ) [ 1 ] , 16 ) if debug_vendor_id == vendor_id and debug_product_id == product_id : return True return len ( hid . enumerate ( vendor_id , product_id ) ) > 0