Last active
October 6, 2016 09:10
-
-
Save gevasiliou/14ee030741e12c4d01532ce371754726 to your computer and use it in GitHub Desktop.
List System Devices with Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sample Code using python-evdev tutorials to list properties of all devices. | |
from evdev import InputDevice, list_devices | |
from pprint import pprint #the pretty print modules | |
for dev in list_devices(): # scan all devices | |
device = InputDevice(dev) | |
pprint(('device: ', device,'-',device.name)) | |
cap = device.capabilities(verbose=True,absinfo=True) | |
pprint(('Device Capabilities:', cap)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment