Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,14 @@ This can also be achieved using the :mod:`selectors` module in Python 3.4:
from evdev import InputDevice
from selectors import DefaultSelector, EVENT_READ

selector = selectors.DefaultSelector()
selector = DefaultSelector()

mouse = evdev.InputDevice('/dev/input/event1')
keybd = evdev.InputDevice('/dev/input/event2')
mouse = InputDevice('/dev/input/event1')
keybd = InputDevice('/dev/input/event2')

# This works because InputDevice has a `fileno()` method.
selector.register(mouse, selectors.EVENT_READ)
selector.register(keybd, selectors.EVENT_READ)
selector.register(mouse, EVENT_READ)
selector.register(keybd, EVENT_READ)

while True:
for key, mask in selector.select():
Expand Down