From 893c8aed129bc5fb29e8b52dee838855913786c9 Mon Sep 17 00:00:00 2001 From: Daniel Quinn Date: Thu, 2 Sep 2021 21:03:32 +0000 Subject: [PATCH] Fix imports in sample The imports were for classes, while the example was referencing the package name --- docs/tutorial.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/tutorial.rst b/docs/tutorial.rst index 604d289..b594516 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -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():