2.2 KiB
2.2 KiB
Notes while working on Kivy
Setup of Kivy
- Went with pip install setup on Ubuntu 15.10 x86-64:
- Fork and clone the Kivy repo:
- Create a virtualenv
- Installed the following dependencies:
libsdl2-mixer-dev libsdl2-ttf-dev zlib1g-dev``` 1. `pip install -e .` 1. `make test` to verify working setup.
Linux Device Issues:
- Running into device permission errors, mostly like caused by the touchscreen or touchpad:
[INFO ] [GL ] NPOT texture support is available
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/dorian.pula/pycon_sprints/kivy/kivy/input/providers/mtdev.py", line 219, in _thread_run
_device = Device(_fn)
File "/home/dorian.pula/pycon_sprints/kivy/kivy/lib/mtdev.py", line 143, in __init__
self._fd = os.open(filename, os.O_NONBLOCK | os.O_RDONLY)
OSError: [Errno 13] Permission denied: '/dev/input/event7'
[INFO ] [Base ] Leaving application in progress...
- Adding user to
input
device did not work. - This may work: https://puredata.info/docs/faq/how-can-i-set-permissions-so-hid-can-read-devices-in-gnu-linux
Tutorial Improvements:
- Adding Ball Animation
- Add in placeholder variable to describe the random direction of the ball.
Kivy File
- Properties need to be declared at the top of a section in Kv.
- Nothing in the Kv language specification on the order of properties / sections.
Kivy language
- Documentation for Kv language
- Documentation on language does not have an explicit section on adding comments.
- Nice to have tips for syntax-highlighting inside Kv files for PyCharm
- Thanks @kjell for pointing out PyCharm settings