How can we query connected USB devices info in Python? I want to get UID Device Name (ex: SonyEricsson W660), path to device (ex: /dev/ttyACM0)
And also what would b
If you are working on windows, you can use pywin32 (old link: see update below).
I found an example here:
import win32com.client
wmi = win32com.client.GetObject ("winmgmts:")
for usb in wmi.InstancesOf ("Win32_USBHub"):
print usb.DeviceID
Update Apr 2020:
'pywin32' release versions from 218 and up can be found here at github. Current version 227.