I have the code below and I would like to feel the parameters of the function map at runtime. It should be like
#devices = map(InputDevice, ('/dev/input/event15','/dev/input/event16'))
But when I try to do it at runtime, it does not work. Here is my attempt:
readers = ""
devices = map(InputDevice, list_devices())
for dev in devices:
if "深" in dev.name or "Barcode" in dev.name:
if readers == "":
readers = "'" + dev.fn + "'"
else:
readers = readers + ", '" + dev.fn + "'"
devices = map(InputDevice, (readers))
Where readers shows exactly '/dev/input/event15','/dev/input/event16', but this string does not work as parameter. I guess it does not work because of the comma. Does anyone know how can I do it?
This function is part of the evdev.
Thanks since now! Best regards, Erik