def get_devices(display=None):
    base = '/dev/input'
    for filename in os.listdir(base):
        if filename.startswith('event'):
            path = os.path.join(base, filename)
            if path in _devices:
                continue

            try:
                _devices[path] = EvdevDevice(display, path)
            except OSError:
                pass 

    return _devices.values()
dataset/ETHPy150Open ardekantur/pyglet/pyglet/input/evdev.py/get_devices/original