I want a python script that will trigger once any device like: a keyboard, a mouse, headphones, charger, etc. For eg: if I plug in my optical mouse, it should print the name of usb device in this case, it is a dell mouse. basically it is a project all about checking for a new usb device and printing that it is connected or disconnected + it's name. I have al ready viewed How to detect a new usb device is connected on python and on Github too! but didn't get the proper solution. any help would be appreciated. In case it matters, I am on Windows 10 20H1 and currently running python 3.10
Asked
Active
Viewed 118 times
0
-
Can you update your post with your code, expected output, and actual output? – Nguyen Thai Binh Dec 18 '21 at 10:33
-
Sorry but i don't have any code i just want code to detect usb devices – Advik Dhangar Dec 19 '21 at 09:59
-
Please provide enough code so others can better understand or reproduce the problem. – Community Dec 25 '21 at 01:15