I recently released Vivarium, a dynamic tiling wayland compositor built using the wlroots library. Going from zero to compositing was interesting, there are good libraries available but everything has moved very fast in the last couple of years so it can be hard to know where to start. I especially …
read moreOther articles
Vivarium 0.0.2 release: improved config handling, cli help, better CI and unit tests
I’ve just tagged for release Vivarium 0.0.2. This is an incremental release with many small fixes following the first release announcement. Many thanks to those who tested it out and reported issues.
Vivarium is a dynamic tiling wayland compositor, with desktop semantics inspired mostly by xmonad.
Release …
Vivarium: A dynamic tiling wayland compositor
This post is to announce the existence of Vivarium, a dynamic tiling wayland compositor.
Core Vivarium features include:
- Automatic/dynamic tiling with your choice of layouts.
- Per-output workspaces: each monitor can switch independently through the same set of workspaces.
- Floating windows on demand.
- (optional) XWayland support.
- Layer shell support, compatible …
An actual history of Python on Android
This ZDNet article was published a few days ago about how “Python apps might soon be running on Android”. It summarises some recent developments in Android support for CPython, but disappointingly it’s highly misleading about some key points. In particular the article states that “apps written in Python may …
read moreGetting started with Kivy
This post collates various resources for getting started with the Kivy graphical framework for Python.
Installation
Follow the official installation documentation.
Introductory resources
- Official Kivy docs
- The official Kivy “Getting Started” pages. These cover general introductory concepts, but are a bit eclectic.
- Kivy’s official Pong game tutorial
- Kivy’s …
- Official Kivy docs
Kivy tutorial 009: Finishing the drawing app
This is number 9 in a series of introductory Kivy tutorials.
Central themes: Passing data between widgets, creating Kivy properties
This tutorial directly follows on from the previous, so start by retrieving the previous code, as below:
main.py:
read morefrom kivy.app import App from kivy.uix.boxlayout import BoxLayout …
Kivy tutorial 008: More kv language
This is number 8 in a series of introductory Kivy tutorials.
Central themes: Event binding and canvas instructions in kv language
This tutorial directly follows on from the previous, so start by retrieving the previous code, as below:
main.py:
read morefrom kivy.app import App from kivy.uix.boxlayout import …
Kivy tutorial 007: Introducing kv language
This is number 7 in a series of introductory Kivy tutorials.
Central themes: kv language, building a gui, integration with Python
The goal of this tutorial will be to build up a simple gui around the DrawingWidget built in the last two tutorials. A nice simple goal would be to …
read moreKivy tutorial 006: Let’s draw something
This is number 6 in a series of introductory Kivy tutorials.
Central themes: Handling touch or mouse input, more canvas instructions
In this tutorial we’ll directly add touch handling to the basic code developed in tutorial 5, starting with the code from last time:
read morefrom kivy.app import App …
Kivy tutorial 005: A drawing app
This is number 5 in a series of introductory Kivy tutorials.
Central themes: Canvas instructions
The next couple of tutorials will move to a new application in order to showcase some more of Kivy’s core components. In this tutorial we’ll cover canvas instructions, Kivy’s low level drawing …
read moreKivy tutorial 004: Making the GUI do stuff, binding to events
This is number 4 in a series of introductory Kivy tutorials.
Central themes: Events and Kivy properties
We left the last tutorial with a calculator app GUI with some nice automatic behaviour, but which doesn’t actually do anything. Let’s change that; it’s time to learn about binding …
read moreKivy tutorial 003: Building a full GUI
This is number 3 in a series of introductory Kivy tutorials.
Central themes: Adding Widgets to one another
The tutorals so far have covered the very basics of a Kivy application; getting everything running, adding a Widget (the Label), and doing some customisation.
Let’s now combine some widgets to …
read moreKivy tutorial 002: Improving appearance, customising widgets using Kivy Properties
This is number 2 in a series of introductory Kivy tutorials.
Central themes: Modifying Widget appearance, Kivy properties
It’s great to say Hello World, but it looks pretty boring, and you’d expect that you’d be able to customise the appearance of text. Fortunately, you’d be right …
read moreKivy tutorial 001: Say Hello
This is number 1 in a series of introductory Kivy tutorials.
Central themes: Starting an App, getting Kivy running
It’s essentially compulsory that the introduction to any programming project should be a “Hello World!” application. Since Kivy is a GUI framework, that means opening a window and displaying the …
read morepython-for-android 2019.08.09 released: running under Python 2 no longer supported
python-for-android is a packaging tool for Python apps on Android. You can create your own Python distribution including the modules and dependencies you want, and bundle it in an APK along with your own code.
python-for-android 2019.08.09 has just been released! I haven’t been making a blog …
read moreA delayed resize layout in Kivy
A user on the Kivy Discord just raised the question of how to delay widget updates during resize events. The problem was that the widgets did some heavy processing (generating matplotlib graphs) that would be very slow if called for every tiny update during a larger resize event.
This is …
read moreWidget interactions between Python and Kv
One of the biggest Kivy confusions I see is how different widgets can access one another when they’re in different parts of the application. Fortunately, it’s generally straightforward to do so. This post gives examples of methods you might use in different situations.
The emphasis here is on …
read moreAn update on python-for-android: v2019.06.06 released and future plans
python-for-android is a packaging tool for Python apps on Android. You can create your own Python distribution including the modules and dependencies you want, and bundle it in an APK along with your own code.
python-for-android 2019.06.06 has just been released! This release contains 198 commits from 31 …
read moreRunning buildozer in a virtual machine
This guide describes how to turn your Kivy/Python app into an APK, by running the buildozer build tool in a virtual machine. This is not the only way to run buildozer, it can work natively on Linux or MacOS or be run from the Windows Subsystem for Linux. See …
read moreLazy Baduk: Leela Zero analysis tool for Android
A few days ago I released Lazy Baduk, a Leela Zero analysis tool for Android. You can download it from Google Play, or directly from the Github release (see below).
Lazy Baduk focuses on making it as easy as possible to start entering and analysing moves with Leela Zero, with …
read moreKivy Hackathon and FOSDEM 2019
For the last 3 days several of the Kivy Core Developers gathered in Brussels, Belgium for the first ever core developer hackathon. Not only is this the first time we’ve gathered to work on Kivy framework issues, but for most of us the first time we’ve ever met …
read moreCached and templated files in python-for-android builds
I’ve more than once seen people confused by how python-for-android constructs an Android project that can be compiled into an APK. Since p4a uses various cached and templated files, it’s easy to get confused trying to edit things only to find your changes are overwritten when you run …
read morepython-for-android 0.6 released
We’ve just officially released python-for-android 0.6. The new version can be downloaded via pip, or will be used by buildozer automatically in new installations. This release contains about 130 new commits from 14 different contributors. Thanks to everyone involved!
python-for-android is a packaging tool for turning Python scripts …
read morepython-for-android 0.5 released
We’ve just officially released python-for-android 0.5. The new version can be downloaded via pip, or will be used by buildozer automatically in new installations. This release contains about 300 commits from almost 40 different contributors. Thanks to everyone involved!
python-for-android is a packaging tool for turning Python scripts …
read morePyonic interpreter 1.3 released: Adds support for loading and executing files
I’ve just released Pyonic interpreter 1.3. As usual you can download it from Google Play, for Python 2.7 or Python 3.6. The APKs can also be downloaded directly from Github (where the source code is also available).
The main addition in this release is a file …
read morePyonic interpreter 1.2 released: Now supports Python 3.6 and input functions
I’ve just released Pyonic interpreter 1.2. As usual, you can get it from Google Play, now for Python 2.7 or Python 3.6. The APKs can also be downloaded directly from Github (where the source code is also available).
This is the first release to target Python …
read morePyonic interpreter 1.1 released: Python 2/3 interpreter for Android, now with autocompletion
I’ve just released Pyonic interpreter 1.1. As usual, you can get it from Google Play for Python 2.7 or Python 3.5, or download the APKs directly from Github (where the source code is also available).
The major feature in this release is autocompletion support via the …
read morePyonic interpreter 1.0 released
I’ve just released Pyonic interpreter 1.0. You can get it from Google Play for Python 2.7 or Python 3.5, or download the APKs directly from Github (update: changed to v1.0.1 following a small bugfix).
The primary change in this release is that both APKs …
read morePyonic interpreter 0.7 released: Python for Android, now supports Python 3
Pyonic interpreter 0.7 has just been released. There are now two versions on Google Play, one for Python 2.7 and one for Python 3.5. The APKs are also available directly from Github. Other features in this release include a new settings screen and improved gui arrangement.
The …
read morePyonic interpreter: a Python interpreter GUI for Android, written in Python
I’ve just released a new app, Pyonic Python 2 interpreter. Pyonic interpreter is a Python interpreter app for Android, providing a convenient interface adapted to mobile devices. The app itself is written entirely in Python using Kivy.
I put this together because I’ve always thought it would be …
read morepython-for-android 0.4 released, now available on PyPI
We’ve just officially released python-for-android 0.4, and pushed it to PyPI for the first time!
python-for-android is a packaging tool for turning Python scripts and apps into Android APKs. It was originally created for use with the Kivy graphical framework, but now supports multiple kinds of Python app …
read moreKivy at PyCon
Kivy 1.10 released
We’re pleased to announce a new stable version of Kivy, version 1.10. You can see the full detailed changelog on the mailing list announcement, and download the new version from the Kivy website or via your package manager.
This release includes many new features. Highlights include:
- Python 3 …
Android apps with Python, Flask and a WebView
python-for-android has just gained support for a new webview app interface, an alternative to the existing SDL2 or Pygame backends. Under this mode of operation the app gui consists entirely of a browser window directed to open a webpage on localhost, and the Python backend can then run any web …
read moreKivy Android app showcase
python-for-android now supports Python 3 APKs
It’s been a long time coming, but we can finally make the announcement… python-for-android now supports Python 3 Android apps! This naturally includes Kivy, but also should work for anything else you can package with python-for-android, such as apps made with PySDL2. Using Python 3 remains experimental for now …
read moreKivy 1.9.1 released
We’ve just released a new stable version of Kivy, version 1.9.1. You can see the changelog on the mailing list announcement, and download the new version from the Kivy website or via your package manager.
This is mainly a bugfix and tidying release following the major version …
read morepython-for-android status update
It’s been a while since Kivy’s python-for-android project was revamped, so here’s a quick status update.
There have since been well over 200 commits from 15 different contributors, cleaning up the missing pieces of the new toolchain and adding new features that weren’t previously possible. Thanks …
read morepython-for-android revamp replaces master
This post is to announce that the revamped python-for-android toolchain, introduced in this previous post, has now been merged into python-for-android’s master branch. This is now the master branch going forward.
The revamp project is largely (but not quite) feature complete with the old toolchain, supporting almost all the …
read morepython-for-android revamped
I’ve recently been working on a significantly revamped version of python-for-android, the Kivy-project tools that take a Python program and package it - along with any dependencies and the Python interpreter itself - into an Android APK that can be run and distributed just like a normal Android app. This rewrite …
read moreKivy core developers interviewed on Podcast.__init__
Some of the Kivy core developers were recently interviewed on Podcast.__init__, including discussion of how Kivy got started, the different things it’s being used for, and the future of the project. Click the link to listen to the podcast.
read morePython on Android
There are an increasing number of resources about different ways of running Python on Android. Kivy (and its subprojects) are commonly mentioned, as one of the most mature and popular ways to do so, but one thing that gets less attention is the details of what you can do with …
read moreKivy 1.9 released
Kivy 1.9 has just been released! This has been a long time in the making, for no very good reason, but now you can take advantage of all our many new features in the stable branch. You can find the full changelog at the official mailing list announcement.
This …
read moreKivy in GSOC 2015
Kivy will be participating in the Google Summer of Code 2015 (GSOC), under the Python Software Foundation umbrella. Applications are welcomed not just for the Kivy framework itself but on all the projects managed by the Kivy organisation including Python-for-Android, Kivy-iOS, PyJNIus, PyOBJus, Plyer and Buildozer. As such, GSOC projects …
read moreHy (lisp) and Kivy
Updating canvas instructions declared in Python
Continuing the theme of my last few posts, a common problem for new kivy users is creating canvas instructions that follow their parent widgets. For instance, here’s some code for a custom widget that tries to draw a red rectangle in its upper-right corner - this is fairly standard kivy …
read moreWrapping text in Kivy’s Label
Another Kivy question that I often see (particularly recently for some reason) is about using the Label widget - how to have text wrap automatically, or the opposite, how to have the label automatically grow to accommodate its text. I’ve covered this before in the 9th Kivy crash course video …
read moreKivy Contest 2014
Just to announce here for anyone that hasn’t seen already…Kivy recently announced the Kivy org second programming contest! You can check out all the details at http://kivy.org/#contest!
To cover the key details here, entries are open now (you can sign up at the link above …
read moreNew Kivy Crash Course video - 14: Using a ScreenManager
New Kivy Crash Course video released, 14: Using a ScreenManager.
This time I cover the basics behind using a ScreenManager widget, which can display one Screen at a time whilst making it easy to switch to other screens including using fancy transitions. The ScreenManager isn’t too hard, but it …
read moreKivy’s bind method
One of the most common problems for new Kivy users is misunderstanding how the bind method works, especially amongst newer Python users who haven’t fully formed their intuition about function calls. For instance, a user will write code like:
some_screenmanager.bind(current=a_function(arg1, arg2))
Here, the idea is …
read moreNo Kivy crash course videos for a few weeks
There won’t be any Kivy crash course videos for the next couple of weeks, as I won’t have the time or tools to make them. I haven’t stopped making them though, they’ll resume afterwards.
read moreNew Kivy Crash Course video - 13: Using Kivy’s settings panel
New Kivy Crash Course video released, 13: Using Kivy’s settings panel.
In this video I cover how to store your application settings in a file, how to read them in when necessary, and how to have Kivy semi-automatically construct a widget so the user can modify settings in real …
read moreNew Kivy Crash Course video - 12: Using Android APIs
New Kivy Crash Course video released, 12: Using Android APIs.
In this video I quickly cover 3 (related) ways to access Android’s APIs straight from Python, making it easy to use hardware features like the accelerometer as well as tasks like sending an email or displaying a notification. It …
read moreCreating a Kivy layout: the SparseGridLayout
I thought for a change I’d try for a shorter post on a single quick subject, so I’m going to quickly explain a simple Kivy layout I created, the
read moreSparseGridLayout
. The post is standalone, but would go well with ideas from my Kivy Crash Course, especially the recent …Shall I keep going?
To anyone reading these write-ups of my Kivy Crash Course…shall I keep going? I’ll keep writing up the individual videos if people are finding them useful, but I’d also like to spend more time blogging about other things (including other Kivy features rather than just following the …
read moreKivy Crash Course 3 - More interesting widget interactions
Introduction
This is the standalone write-up of my third Kivy Crash Course video, linked above. In this entry, I head back to Python to add some more complex and interesting behaviour to our simple program from the first article.
If you want to follow along, you can copy …
Kivy Crash Course 2 - Building an Android APK
Introduction
In this writeup of my second Kivy Crash Course video, I describe how to use the buildozer tool to compile a Kivy application into a fully functional standalone Android APK. For reference, you can find the original video here.
This particular article may have some overlap/redundancy …
Kivy Crash Course 1 - Making a simple App
Introduction
This is the first entry in my Kivy Crash Course, originally a series of short (~10 minutes or less) youtube videos introducing how to create an app using the kivy graphical framework, how to use different Kivy features, and other topics like how to build for android …