Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A toy for my son
#2
There are different libraries to get access on input devices.

https://pypi.python.org/pypi/inputs

In the past I use a similar library, but I can't recognize the name. Something with ev... or eb...
But at the end all libraries for inputs do have the same structure.
You initialize an instance of the device. In a loop you're asking for incomming events like: x-axis, y-axis, buttons
Inside this loop you can handle also the other tasks.

You can also use threading or multiprocessing to do tasks, which could block the event loop.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Messages In This Thread
A toy for my son - by RailRoaded - Mar-24-2018, 02:32 PM
RE: A toy for my son - by DeaD_EyE - Mar-24-2018, 04:43 PM
RE: A toy for my son - by RailRoaded - Mar-27-2018, 02:18 AM
RE: A toy for my son - by sparkz_alot - Mar-27-2018, 01:28 PM
RE: A toy for my son - by RailRoaded - Mar-27-2018, 04:00 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020