Better Programming

Advice for programmers.

Follow publication

5 Ways To Use Python on an iPad

I ditched my MacBook Pro for an iPad Pro. Here’s how I code in Python on my iPad

David Amos
Better Programming
Published in
12 min readJan 11, 2022

--

Photo by Ern Gan on Unsplash

When Apple released the M1 iPad Pros in March of 2021, I traded in my MacBook Pro to get the latest tablet. I’d already been using a Mac Mini as my daily workhorse, so I wasn’t concerned about my day-to-day coding workflow. But I was very curious to know what coding on the iPad looks like, and if a full-featured professional coding set-up was even possible.

While a native Python IDE experience is still unavailable for iPadOS — and might never be — it turns out that it’s actually pretty easy to code in Python on the iPad, especially if you’re willing to work in Jupyter Notebooks. You don’t even need an iPad Pro!

Here are five ways you can code in Python on any iPad right now.

1. a-Shell

My go-to app for using Python on the iPad is Nicolas Holzschuch’s fantastic a-Shell app. a-Shell gives you a Unix-style terminal on your iPad or iPhone and it’s completely free. It’s also quite powerful. You can directly download it on your App Store from here.

Once you install and open a-Shell, type help to get a quick overview of the app:

a-Shell comes with vim and ed for editing files, and it includes Python 3.9 out-of-the-box. Here’s what editing a Python file in vim looks like:

Very nice!

Tip: If you use Apple’s Magic Keyboard for iPad, then you don’t have a physical Esc key. This makes working in vim painful until you figure out that Cmd + . works like Esc. If you'd like, you can change Caps Lock to work as Esc in a-Shell’s settings.

You can also map the globe key on the Magic Keyboard to function as Esc in the Settings app.

a-Shell plays nicely with iPadOS 15’s multitasking features. You can open new windows, put a-Shell side-by-side with another app, and —…

--

--

David Amos
David Amos

Written by David Amos

Professional technical writer, amateur everything else. Read my mind at https://thoughtcicles.xyz.

Responses (3)

Write a response