I'm going nuts trying to find a solution to this problem. I want to create physical button that can access and control web pages (click on a web page button, for example). I'm using a raspberry pi model B, running NOOBS Lite, and I've got it working such that the button opens a web browser page. great. However, I'm doing this with webbrowser.py, and all it can do is open the page, no control or even close the page. back to square 1. So, I'm checking out ctypes and uinput, specifically. I can't get either to work. I kep getting an OSError.
Traceback (most recent call last):
File "button.py", line 23, in <module>
uinput.BTN_LEFT, uinput.BTN_RIGHT])
File "/usr/local/lib/python2.7/dist-packages/uinput/__init__.py", line 161, in __init__
self.__uinput_fd = _libsuinput.suinput_open()
File "/usr/local/lib/python2.7/dist-packages/uinput/__init__.py", line 64, in _error_handler
raise OSError(code, os.strerror(code))
OSError: [Errno 2] No such file or directory
Can anyone offer any help?
button interface
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: button interface
The errors say the Python interpreter can't find the uinput module. Are you sure you installed it for Python 2.7 and not Python 3?
Please be positive and constructive with your questions and comments.