Run Python offline on iPad and iPhone

Kodo Editor runs Python on iPad and iPhone using bundled CPython through Pyodide and WebAssembly. You can run scripts with the standard library, interactive input and local multi-file projects without Wi-Fi.

Download Kodo on the App Store

By Theodor Tiberius StefanUpdated

How to get started

  1. Create a Python file named main.py in a local Kodo project.
  2. Paste the script below. It reads your name and prints a greeting.
  3. Open the file and use Run. Enter a name when the terminal requests input.
  4. Move a helper function into a second file in the same project and import it. Save both files and run the entry point again.
  5. Switch off Wi-Fi before travel and repeat the run with all project files available locally.
name = input("Name: ")
print(f"Hello, {name}!")
Kodo running a local program in its iPad terminal
The integrated terminal, shown in the App Store screenshot.

Limits to know

Start with the bundled standard library. Test any package or dependency your course needs before committing to an offline setup. A desktop environment or a remote host is useful for dependencies that require native extensions.

Frequently asked questions

Do I have to download Python separately?

The Python runtime ships in the app. [source: App Store]

Does input() work?

Yes. Supply interactive input in the built-in terminal when the script asks for it. [source: App Store]

Can a script import another file?

Yes. The app supports multi-file Python projects. Keep helper modules inside your project. [source: App Store]

What about NumPy, pip and breakpoints?

The Kodo 5.6 listing documents a bundled standard library and terminal input. Check the requirements of your project separately if it relies on packages or a step debugger. [source: App Store]

Related guides

Download Kodo on the App Store Read the Kodo guide

App Store release 5.6 ·