python: drop now unused import of evemu.event_names

Module was dropped in 606d2135c5 after removing the need for it by using C
wrappers around libevdev instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
python: remove out-of-date comment

This was probably true at some point but it's not anymore now.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
python: switch from type() == str to not isinstance(int)

Switch to isinstance to be more liberal in what we can accept.
Anything that looks like an int should be used as such, anything else we
assume to be a string that needs parsing. event_get_value() would do that for
us but we can't call it unconditionally - some events don't have names so they
cannot resolve.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
python: add docstrings to evemu.Device

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
python: fix a couple of comment claiming we need root

We do, but technically we just need the right permissions

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
python: check for fileno(), not read() and document it

We use fileno() on the various file arguments, not read() so check for that.
And document it in the API that we need real file objects here, not just
something that's file-like.

Reported-by: Dan Callaghan
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>