This version of the Votes demo offers a frontend written using Kivy, in addition to a browser frontend.
In the demo folder do
and then open
to see the browser frontend.
For the kivy frontend you need to install kivy (big surprise, although take care to choose a Python2.7 version since this demo uses Twisted, currently Python2 only) - follow the instructions at the project website.
You then need to install Autobahn|Python and its dependencies - for kivy:
kivy folder, using the Python as setup by kivy, do
- on Mac OSX
kivy -m pip install -r requirements.txt
- on other systems
python -m pip install -r requirements.txt
Note: To use Python with kivy's setup e.g. on Windows go to the kivy folder, execute
X.xis the Python version you downloaded kivy for), which opens a command shell with the environment set to use the correct Python. Then navigate to the Votes demo folder and execute the above command.
Then start the kivy Votes frontend by doing
This connects to the locally running Crossbar.io and backend, just like the browser frontend mentioned above.
Use either frontend to increase/reset the vote count, and see this updated immediately in the other frontend.
Thanks to Roger Erens for providing this example!