Last Updated on
There’s something distinctly odd about coding on an iPad, almost as if you’re doing something you shouldn’t. But if you’ve got a keyboard, there’s nothing to stop you bashing out pages of Python code into an Apple tablet. Pythonista 3 is by far the best Python IDE for the iPad that I’ve come across. Here’s why.
Pythonista 3: features
I’ll start by confessing I’m no Python expert. Indeed, I’m very much in the beginner camp, still teaching myself how to code from textbooks. So, proceed with caution if you’re a dyed-in-the-wool developer, because I’m not going to be diving neck deep into advanced features.
What has Pythonista 3 got to offer? Well, like most modern code editors, the Pythonista 3 one comes with coloured syntax highlighting and code completion. Start typing a previously defined variable, for example, and it will appear in the auto-complete dropdown as you type, allowing you to dab the Tab key and avoid any unfortunate typos.
There are clever touches, too. For example, if you’re changing the colour of something, you’ll get a preview of that colour on screen as you type the colour’s name, as shown below:
If you’re using the iPad in laptop mode with a keyboard attached, you can use the splitscreen feature, allowing you to have a textbook or GitHub open on one side of the screen and Pythonista in the other:
Pythonista has built-in keyboard shortcuts, but as you can see a row of common special characters is also available on screen. Sadly, Pythonista doesn’t yet offer support for mouse/trackpad on the iPad, but you’d hope that will come in an update soon, as that would make moving the cursor within code much more precise. As it is, there are other little shortcuts – such as dabbing the screen with two fingers to select an entire line of code – that make life easier than relying purely on Apple’s awkward hold to select.
When you’ve typed a section of code and want to test it, you simply press the Play button at the top of the screen to enter the console, which runs the code. Flipping between editor and console takes a swish of the finger. One thing to watch for here: the console doesn’t automatically reset. So, if you test a section of code, find something’s wrong and replace it, when you run the new code its output will appear beneath the previous output. You need to press the clear button before you exit the console if you want to restart with a clean slate.
The console can deal with 2D graphics too, which is great if you’re coding basic games or UI elements. The UI Editor apparently allows you to create and adjust UI elements without writing any code, but I’ve not fiddled with that a great deal yet.
Pythonista 3 also comes with a decent library of code examples. These range from UI elements such as clocks right through to entire games that you can play on the iPad, such as this Breakout clone:
Being able to see and tweak the code – and actually realise just how few lines of code it takes to create a game like this – gives real hope to a beginner like me.
I’m sure there are tons more features – such as built-in code libraries, documentation and the surprising ability to run Pythonista scripts from within other iPad apps – that I’ll appreciate when my coding skills are fully buffed. In the meantime, you might want to check out the features list on the Pythonista 3 website if there’s something I’ve not mentioned.
For only £9.99 on the App Store, I don’t think you could reasonably ask for much more from Pythonista 3, but if you’re a Python programmer and think there’s something missing here, please let me know in comments below.
Ease of use
A great, feature-packed code editor and console for those who want to code on their iPad
- Powerful code editor
- Automatic code completion
- Ability to build 2D animation and games
- Currently lacks support for mouse/trackpad