How to Use Kivy on Repl.it

I made the Kivy Python cross-platform GUI framework work in a GFX REPL on Repl.it. Repl.it is a multi-language cloud IDE with good support for Python.

To use Kivy on Repl.it, just create a Pygame REPL, which is among the Kivy dependencies, and install Kivy with the package manager or by adding kivy to requirements.txt. Starting such a REPL in a new session takes a while to download and build the required libraries, at least several minutes. So be patient.

This REPL runs the Kivy Showcase, a demo app that showcases some of Kivy’s features. The demo works fine except for a few overlapping widgets in the top bar. And it has some latency issues, but the poor performance is mostly a consequence of the experimental state of GFX.

If you adjust the handles along the edges of the REPL panes to close all the panes except the app’s, you can use most of the web page area. Here’s a screenshot of what it looks like. I can’t wait for GFX to support running graphical apps as a website, like it’s now possible with terminal apps.

The Showcase Kivy demo running on Repl.it
The Showcase Kivy demo running on Repl.it maximized in a window by closing all the REPL panes.

The work of Repl.it user Saibot84 put me on the right track. He experimented with various ways of running Kivy on Repl.it, for example with Polygott and Python REPLs.

Polygott REPLs get stuck when downloading libraries. So I found that the simplest way of running Kivy is to use a Pygame REPL. Unlike Saibot84’s Pygame REPLs, however, it’s unnecessary to explicitly add the Kivy dependencies to requirements.txt, only kivy.

Popular posts from this blog

Using a Bluetooth Keyboard on Android

Lenovo Tab M8 HD Review

Reading PDF Ebooks with Google Play Books