Python puts its print on multitouch apps with Kivy

The Kivy library is based on cross-platform OpenGL, so native apps can run on iOS, Android, Windows, Linux, and OS X

Kivy, an open source library based on Python, brings native development of user interfaces and multitouch applications to Android, iOS, Linux, Windows, and Mac OS X.

"It's Python scripting on top of OpenGL to create UIs and process touch and other inputs," said Brian Knapp, a freelance Android application developer and a core participant in Kivy. "OpenGL is cross-platform, so Kivy can be used to write cross-platform UIs."

Now at version 1.8.1, Kivy has been used in a number of commercial iOS and Android applications, Knapp said. The Kivy website features demos of applications like ProcessCraft, for business process modeling; NoBooth, for browsing photos; and games.

"Kivy is used to develop native applications. The distinction is that we don't use HTML/CSS/JavaScript and other Web technologies," Knapp said. "On either iOS or Android, a small program called a stub launches the Python process. Both the stub and the Python program are native." For multitouch development, drawing items on the screen works the same on Android and iOS but is not tethered to Web APIs, JavaScript, and "uncontrollable browser behavior," Knapp said.

Featuring a multitouch mouse simulator, Kivy can natively use inputs, protocols, and devices like WM Touch, WM Pen, Mac OS X Trackpad, and Linux Kernel HID. GPU acceleration is highlighted with Kivy, which also has a widget toolkit. Kivy is available under an MIT license, and enhancements in development include an entity component system and increased Android API support using the C-like Python dialect Cython.

The emergence of Python-based Kivy is not surprising, as Python has been popular with developers since the early 1990s. The language ranks number 3 in the PyPL language popularity index this month and seventh in the current Tiobe Index.

Asked how Python stacks up as a rapid application development option compared to languages like Ruby or Java, Knapp said he sees Java as "incredibly verbose" and Ruby as lacking ecosystem strength outside of the Web. But Knapp concedes Python has performance issues. "Python is great except that performance is terrible. Performance-sensitive code almost cannot be written in Python," he said, though Python founder Guido van Rossum said in a 2012 presentation that the language was fast enough.

This story, "Python puts its print on multitouch apps with Kivy," was originally published at InfoWorld.com. Get the first word on what the important tech news really means with the InfoWorld Tech Watch blog. For the latest developments in business technology news, follow InfoWorld.com on Twitter.

From CIO: 8 Free Online Courses to Grow Your Tech Skills
Join the discussion
Be the first to comment on this article. Our Commenting Policies