App Review: Pythonista

I recently bought Pythonista for my iPad and iPhone in an attempt to code more often in my free time, even when I don’t have my computer on me.

Features

Pythonista has a vast amount of features that really make programming on iOS a breeze.

The Code Editor

The code editor in Pythonista is definitely one of the most powerful code editors you get on iOS. With its vast amount of features, it almost feels as if you are programming on a desktop. Let’s take a look at a few of these features.

The Keyboard

Pythonista equips your keyboard with a turbo and nitro. By providing you with two rows of special characters, numbers and an undo button, you won’t ever have to change to the symbols keyboard again while programming! Some of the keys even provide additional symbols when you long press the key – just like the normal iOS keyboard. This means that almost every symbol you can think of is one touch away.

Syntax Highlighting

The code editor comes with built-in syntax highlighting for the Python language. Six different colour themes are provided, three dark and three light themes.

Code Completion

Can’t remember those long method and class names belonging to a module whose name was wiped from your memory long ago? No problem!

Pythonista comes with code completion for all Python methods, classes and modules. It can also analyse your code and provide code completion for your methods, classes and variables.

Other features

Word Wrap

The Pythonista editor comes with neat word wrapping which allows you to see all of your code without the need to scroll horizontally. The wrapping is clearly indicated reducing the chance of you mistakenly treating the wrapped line as a separate line.

Indentation

You are able to choose how wide your indentation should be and whether you want the indentations to consist of a tab or spaces inside Pythonista’s settings.

Auto-Pair Characters and Highlighting of matching brackets

Among all the options, Pythonista also has an option to automatically add the closing bracket when an opening bracket is typed and highlight it. A small but very useful feature.

The Console

Pythonista comes with a fully interactive built-in Python console which is just a swipe away from your code editor. This console is a worthy rival for the interactive console provided with Python itself on the desktop.

The Keyboard

The console also comes equipped with an extended keyboard just like the code editor has, speeding up your typing considerably.

Code Completion

Just like the code editor, the console also comes with code completion which makes reduces the time it takes to type those long method names drastically.

Command History

The console provides you with a full history of all the commands you previously ran at the tap of a button. This allows you to execute a past command easily without re-typing it. This characteristic is much like pressing the Up arrow in the Python console on the computer.

Other features

Copy Text Output

The console allows you to also copy the contents of the console to your device’s clipboard which can then be pasted in another application.

The Docs

Swipe between Docs and Code Editor

The Docs are put with the console making it easy to switch between the Docs and the console with a single swipe.

Suggested Search Results

Suggested search results may not be a big feature, but they sure save you from having to type in the module, class and method name you are looking for in the documentation.

The UI Designer

Wait what!? A UI designer!

Yep, you heard right. The folks over at omz:software were kind enough to provide us with a UI Python library which allows us to make practically native looking UIs for our applications. What!?!

Drag-n-Drop UI Designer

Pythonista comes packaged with a built-in drag-n-drop UI designer which allows you to easily create and modify UIs for those Python scripts of yours. You can position, resize and modify elements to your liking with the tap of a finger.

Access to a variety of editable attributes

The UI designer grants us access to a whole collection of attributes for each UI element. You can go and add an Action or change the border width of your button and add a custom icon to it to suit your needs. This really allows you to extend the appearance of the UI elements phenomenally.

Fully Responsive Layouts

The UI designer allows you to create layouts that scale with different screen sizes, allowing you to make applications for both the iPad and iPhone without having to design various versions of the UI for each device.

Variety of elements to choose from

Pythonista provides you with an adequate amount of different elements that you can use in your application, including a Navigation View which allows you embed views inside a main view. This really allows you to make complete applications to perform simple tasks.

There are a few elements that I wish Pythonista had such as a Number Spinner for selecting numbers as well as WebView element as this would allow us to possibly combine HTML, CSS and Javascript with Python to create stunning applications.

The Scene Library

Pythonista comes with a library which allows you to create graphical Scenes. The scenes can be used to display animations or even create interactive games.

Layers

Layers allow to you to easily divide your screen into rectangular areas which can be animated differently from the rest of the screen. Layers also allow you to add sublayers, manipulate the layer by rotating it or scaling it and ignore all touch events that occur on that specific layer if the need arises.

Touch Events

The Scene library allows you to detect touch events that occur on the scene and respond accordingly. This allows you to create interactive games for your iPad using only Python!

The File Browser

Pythonista possesses a relatively powerful file browser which can made even more powerful by programming custom features in Python.

Thumbnail and List view

The file browser allows you to view your files in either a list view or a thumbnail view. A list view simply displays the file name while the thumbnail view displays the first few lines of the code inside the file as the file thumbnail as well as the file name below it.

Predefined File Templates

Pythonista comes with predefined templates which allow you to dive directly into the coding.

Basic File Operations

The file browser has some basic file operations such as Delete, Move and creating a New Folder. The only operation that I feel is missing is a Copy or Duplicate operation, but this can be easily implemented by extending the file browser with your own Python script.

Other

Web Browser library

Web Browser library

Pythonista comes packaged with a webbrowser library which allows us to open html pages directly from our script. There are scripts that make use of this library to browse the back-end files of your iOS device(yep, those files Apple doesn’t want to let you see) without jailbreaking it.

The webbrowser library can also be used to open other applications and send data to them straight from inside your script using App URL Schemes. This means you can automate processes on your iOS device. For example, with WhatsApp you can enter the following:

whatsapp://send?=Yello

This will send the string “Yello” to any of your contacts in WhatsApp you choose.

Extending Pythonista with scripts

Another fancy feature that Pythonista has is the ability to extend the app itself with your own Python scripts. You can get Python scripts online to perform a variety of actions. These actions can be added to your Actions menu in Pythonista which is easily accessed while inside the code editor.

Some of my Actions are an Open In script which allows you to open any file in Pythonista in another app using iOS’s Open In menu, a Shortcut Generator script which allows you to create a Home Screen icon to your Python app and a GitHub Gist downloader which allows me to easily download useful Python Gists straight from GitHub. I have also made a Regex Search and Replace for my editor which, as the title suggests, allows me to do find and replace on the current file open in my editor using regular expressions.

Sample projects

Pythonista also comes with a large amount of example scripts, UIs and games demonstrating all the different features that Pythonista possesses. These examples range from a calculator with a UI to a card game using scenes.

My thoughts

Pythonista really is one of the best apps for programming Python on your iOS device. The interface is simple but powerful and can easily be extended using Python scripts.

Pythonista does lack a few minor features like a Copy function built-in the File Browser. It would also be nice if there were a few more UI elements to add to your UI but it’s no biggie.

Overall I believe this app fulfills its purpose and I would rate it a 9/10. Well done omz:software, keep up the good work.

Get the app

Author: omz:software

Price: R89.99 ($6.99)

Rating: 9/10

Pythonista© and its graphics are trademark of omz:software.