Current location - Quotes Website - Team slogan - Python gets the description of the serial device.
Python gets the description of the serial device.
Import? winreg?

Keys? =? Warreger OpenKey(winreg。 HKEY_LOCAL_MACHINE? r " SYSTEM \ Control set 00 1 \ Control \ Class \ { 36 fc9e 60-C465- 1 1CF-8056-444553540000 } ")

For what? Me? Are you online? Range (winreg. QueryInfoKey(key)[0]):

Subkey? =? Warreger OpenKey(winreg。 HKEY_LOCAL_MACHINE? " SYSTEM \ \ Control set 00 1 \ \ Control \ \ Class \ \ { 36 fc9e 60-C465- 1 1CF-8056-444553540000 } \ \ "? +? Warreger EnumKey (key,? I))

Print (winreg. QueryValueEx (child, DriverDesc'))

Warreger CloseKey (sub-item)

Warreger Close key

Import? winreg

Keys? =? Warreger OpenKey(winreg。 HKEY_LOCAL_MACHINE? R "Software \ Microsoft \Windows? NT \ current version \ port ")

Try:

Me? =? 0

What time? 1:

Name,? Value? Type? =? Warreger EnumValue (key, me)

Print (repr(name),? Value)

Me? +=? 1

Value? Type? =? Warreger QueryValueEx(key," EnableAutoTray ")

Except? File not found error:

print

Except? O error:

Print answered one before, which seems to be similar to what you said. They all read the registry, one reads USB and the other reads serial port.