Skip to content

Commit 893c8ae

Browse files
authored
Fix imports in sample
The imports were for classes, while the example was referencing the package name
1 parent 5adc2ab commit 893c8ae

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/tutorial.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,14 @@ This can also be achieved using the :mod:`selectors` module in Python 3.4:
175175
from evdev import InputDevice
176176
from selectors import DefaultSelector, EVENT_READ
177177

178-
selector = selectors.DefaultSelector()
178+
selector = DefaultSelector()
179179

180-
mouse = evdev.InputDevice('/dev/input/event1')
181-
keybd = evdev.InputDevice('/dev/input/event2')
180+
mouse = InputDevice('/dev/input/event1')
181+
keybd = InputDevice('/dev/input/event2')
182182

183183
# This works because InputDevice has a `fileno()` method.
184-
selector.register(mouse, selectors.EVENT_READ)
185-
selector.register(keybd, selectors.EVENT_READ)
184+
selector.register(mouse, EVENT_READ)
185+
selector.register(keybd, EVENT_READ)
186186

187187
while True:
188188
for key, mask in selector.select():

0 commit comments

Comments
 (0)