update debug code in traceEvdev

This commit is contained in:
chrys 2016-10-19 16:15:37 +02:00
parent 13a4ece690
commit 77db18f366

View File

@ -5,9 +5,16 @@ from select import select
import time
devices = map(evdev.InputDevice, (evdev.list_devices()))
devices = {dev.fd: dev for dev in devices}
for fd in devices:
print('Devicename:'+ devices[fd].name + ' Devicepath:' + devices[fd].fn )
devicesNew = {}
for dev in devices:
try:
devicesNew[dev.fd] = dev
print('DONE: Devicename:'+ devicesNew[dev.fd].name + ' Devicepath:' + devicesNew[dev.fd].fn )
except Exception as e:
print('ERROR:'+ ' ' + str(e) )
for fd in devicesNew:
print('Devicename:'+ devicesNew[fd].name + ' Devicepath:' + devicesNew[fd].fn )
#--- log events---
#while True: