Python Code Runner For Android

QPython - Python on Android. In most cases, script can get your jobs done as good as the native application. Now you can make it with QPython's help. QPython is a script engine which runs Python programs on android devices. It also can help developers develop android applications. This is the QPython 3L, it is mainly for experienced Python users, and it provides some advanced technical features. # Amazing Features. Offline Python 3 interpreter: no Internet is required to run Python programs. It supports running multiple types of projects, including: console program, SL4A program, webapp program.


Best Python Editors for Android

Sounds crazy, isn’t it?

Coding on a smartphone is not easy at all, but with some advanced applications specially made for these purposes, you can handle, client-side as well as server-side both.

Everyone has android phones nowadays.

Everyone wants to learn to code, but are constrained by certain restrictions to learn. The most exploding error is you need a computer even to learn the basics.

A few years ago, people were left with no choices and ended up buying a laptop or a computer worth 500 dollars. The worst thing happens when they see coding is not made for them and they should try some other thing. Total Waste!

Hence if you are a complete beginner and not learning it genuinely but as a part of a hobby, you must avoid buying a laptop or PC. In 2021, you have mobile applications to try out. Once comfortable with the basic syntaxes, you can obviously go to amazon and buy a laptop.

Why not use Web-Based Interfaces for coding?

Another thing that comes with the coding on a phone is writing and practicing directly on the learning websites. Sites like W3Schools, learn python, Codecademy, etc provides a separate code editor where you can write code and execute them with a built-in compiler.

Runner

These websites are smart enough but lack in certain aspects like their code editor lacks code formatting, indentation, syntax highlighting, and file saving features. However, we should not overlook the giant and deep knowledge they provide.

A dedicated application for coding provides you a distraction-free environment. Other than that, it let you get rid of the internet for formatting and saving code.

These applications completely rely on built-in compilers rather than an online one. Other features like themes and syntax highlighting in multiple colors also available in them. There is support for extended keyboard and auto-complete functions.

Also Read: 10 Most-Popular Java Editor Apps on Play Store

Also Read: 2021’s Top 10 Coding Challange Websites [Free]

Also Read: Top 10 Best JavaScript Editors For Android

List of best Python Editors for Android to use in 2021

1. Pydroid 3

This is top to our list and priority. It supports the latest python 3.8 interpreter which is an awesome thing with a mobile application. Creators are really concerned about these little things that others ignore. The interpreter is absolutely offline.

It has support for some advanced Scientific libraries like NumPy, SciPy, and matplotlib for data analysis. For machine training, there is support for Scikit Learn and TensorFlow. For GUI based application development you can also import Tkinter.

There are a bunch of other things why this editor should be your priority. Some important of them are listed below.

System Features:

  1. Comes with Python 3.8 Interpreter
  2. The compilers are absolutely Offline.
  3. Availability of pip package manager with an easily importable custom repository for scientific libraries such as sci-kit learns for machine learning, NumPy, matplotlib, Panda, etc.
  4. Availability of big libraries like TensorFlow.
  5. Availability of examples for quick learning of python.
  6. Tkinter support for GUI.
  7. Terminal Support.
  8. CPython is also supported.
  9. Comes with a Built-in compiler for C, C++, and Fortran.
  10. PDB debugger with watches
  11. Availability of graphical library with SDL2
  12. PyQt5 and other libraries like matplotlib are quickly installable without any extra code required
  13. Pygame 2 support

Editor Feature:

  1. Auto indentation feature
  2. The application features code prediction like a system-based editor
  3. Syntax highlighting is also available
  4. Enhanced and easy code navigation
  5. Multiple tabs support lets you create multiple tabs at once

Pricing

Basic version – Free

Upgrade – $13.99

2. Acode

Acode is a simple and light-weight IDE for Andriod. This application is not focused on a particular language but supports all the languages to the best.

Without any ads, you will be able to develop an entire application in python or design an entire template with HTML, CSS, and JavaScript. There are another bunch of features that I have listed below.

acode app images

I have discussed this app in another article where I have given you a list of best HTML editors for Android.

System Features

  1. There is terminal support on this application.
  2. The files are editable from any device
  3. It has support for GitHub.
  4. FTP Support.
  5. It’s an open Source application, so the application is absolutely free without any ads.
  6. The workflow is smooth and enhanced despite being a mobile editor.
  7. Supports other languages than Python such as PHP, Java, JavaScript, C, C++, etc.
  8. The application is highly customizable.
  9. Availability of JavaScript console.

Editor Feature

  1. Syntax highlighting for different functions, classes, and variables
  2. 10+ Themes
  3. User friendly
  4. HTML preview inside the app
  5. Keyboard shortcuts
  6. No Ads (appreciable)

Pricing

Free (No Ads)

3. Dcoder

Dcoder is a mobile-based IDE with a built-in compiler for more than 50 programming languages including C, C++, Python, and Java. Particularly focused on development it has a bunch of great and easily accessible frameworks such as React.js, Angular, Django, Flask and flutter, etc.

dcoder app images

This application boasts to match the efficiency of Notepad ++ and Sublime text and Eclipse. Here you can find algorithmic problems to solve according to the difficulty level that suits you.

System Features

  1. Almost all languages (50+) are supported including pascal, swift, objective C, etc.
  2. Python 2.7 and 3, are supported.
  3. Easy handling of compilation results
  4. Challenges and problems are available to solve
  5. Python frameworks such as Django and Flask are supported. Other frameworks like React.js, Flutter, Angular are also supported.
  6. Github support
  7. Easy deployment of the project right from the phone
Runner

Editor Feature

  1. Syntax Highlighting
  2. Auto indentation and parenthesis
  3. Easy Undo Redo
  4. Custom suggestion view

Pricing

Free (Contains Ads)

4. Programming Hub

Programming hub is not a dedicated code editor but it’s a learning platform that comes with a built-in code editor. I only included this application on this list since it is developed in collaboration with Google experts. It’s fun to learn here as easy and interesting as playing a game. The application is best for beginners.

System Features

  1. Conceptual illustrations to learn in a friendly way
  2. Support for Python 2.7 and 3.7
  3. Support for other programming languages such as C, C++, HTML, JavaScript, and R.
  4. Support for Linux shell scripting
  5. Availability of programming courses
  6. One can also learn SQL
  7. Big data analysis is possible here

Editor Feature

  1. Interactive experience
  2. Automatic code indentation
  3. Code suggestions are provided while you type.
  4. One of the best AI-based editor
  5. No ads at all

Pricing

Free (No Ads)

5. Spck Code Editor

It is one of the best code editors for python on android systems. Easily installable from the play store, the application lets help you a lot while writing code. It mainly supports HTML, CSS, and JavaScript but other languages like python, ruby, C++, and Java are also supported.

SPCK app images

This particular editor is by far one of the best with advanced code-hinting supports like TypeScript and Emmet abbreviation. Down below are its other features listed.

System Features

  1. Easy to clone and handle repositories (GitHub, Gitlab, Bitbucket)
  2. Git integration
  3. Enhanced webpage viewer
  4. Available support for JavaScript console
  5. Export and import into ZIP formats
  6. No internet connection is required
  7. Support for almost all languages, the main highlighted languages are HTML, CSS, JavaScript (focused on web-designing)
  8. You can backup files anytime

Editor Feature

  1. Keyboard extension for faster code edits
  2. Smart auto-completer
  3. Automatic indentation (js-beautify)
  4. Light and dark themes available
  5. Smart code editing with Emmet abbreviation support

Pricing

Free (No Ads)

6. Creative IDE

It is a development environment as well as a learning platform. The application supports dozens of programming languages and another dozen frameworks. It runs without an internet connection. The applications support python 2.7 and python 3 as well.

Anyone can practice on the one that suits their projects. It’s a good application for beginners as well. Along with a powerful code editor, it has some ultimate features that are listed below.

Note: Creative IDE app is not available on Play Store because of some reasons.

System Features

  1. The application runs without an internet connection
  2. It’s a beginner-friendly application, you can use it even if you are a newbie
  3. The code editing the lag-free performance boasted and supports more than 100 lines
  4. The errors are easily solvable, thanks to the great debugger that shows suggestions in number and segment
  5. For web development, you have support for a built-in chrome-like browser with developer tools, inspector, console and page source viewer
  6. The IDE is small in size and lightweight for low specs smartphones to handle easily

Editor Feature

  1. There is support for dark theme also
  2. You can make use of unlimited tabs and terminals
  3. An extended keyboard is provided for quick and stable typing
  4. The code editor features syntax highlighting for different functions, classes and methods
  5. There is support for built-in tools like a clipboard manager, color-picker, etc.

Pricing

Free (Contains Ads)

7. QPython 3L

Another efficient and user-friendly code editor for android is QPython 3L. It comes with some of the popular and amazing features such as QPYI, interpreter, runtime environment, and SL4A support.

qpython app images

QPython 3L is good for experienced users as well as beginners. The plus point is the application is free to use and is feature-friendly.

System Features

  1. There is support for QPYI and SL4A library
  2. It is an open-source application so that’s free to use without any ads
  3. Python interpreter is offline, no internet connection required while you run the application
  4. It supports running multiple programs at the time such as web app, console, and SL4A, etc.
  5. Scientific libraries such as NumPy, SciPy, matplotlib, sci-kit learn is supported.
  6. There is an understandable explanation for everything (documentation), it will help you as a beginner.
  7. There is GitHub support.

Editor Feature

  1. Easy to use interface
  2. Code highlighting and automatic indentation

Pricing

Free (Contains Ads)

8. Online Compiler

An online compiler is one of the best applications to serve as a code editor for python. Though it supports more than 23 languages, it is without a complaint, lag-free and efficient. What makes it different from others are the compilers that come with it are cloud-based which is why the size of the application comes out to be just 1.7 MB.

System Features

  1. The online compiler supports more than 23 programming language.
  2. Linux shell scripting is supported
  3. There is support for the GCC compiler for C, C++, C++ 14, C++, 17, and mono compiler for C#.
  4. It has support for Python 2.7 as well as 3.0.
  5. The highlighted feature is the app size being just 1.7 MB, the reason is it is an online cloud-based compiler, it will surely need your internet connection.
  6. A file can be easily imported from local storage.

Editor Feature

  1. Proper Syntax highlighting in different colors.
  2. The autosaving feature is there to save your codes as soon as you type, no fear of losing your work.

Pricing

Free (Contain Ads)

9. Code Editor by Rythm Software

The application is specially optimized for coding and supports more than 100 languages. It contains all the required features for coding such as syntax highlighting, code auto-completion, and auto-indentation, etc. The user interface is pretty clean and focused.

code editor app images

System Features

  1. It has support for more than 110 languages including the different versions of Python
  2. It comes with a built-in JavaScript console if you need some frontend work while developing with python.
  3. Files can be easily accessed from Google Drive, Dropbox, and OneDrive
  4. One can create unlimited tabs and can easily switch between them.
  5. Search and replace feature are available

Editor Feature

  1. Code auto-completion is available which is very helpful to enhance speed.
  2. Undo and Redo codes and other changes.
  3. The extended keyboard is enabled as you type
  4. Automatic indentation is available
  5. HTML and Markdowns can be previewed
  6. There are 3 themes available for this application.
  7. Syntax highlighting in 30+ themes, absolutely wonderful, matches the efficiency of VSC.

Pricing

Free (Contain Ads)

10. DroidEdit

DroidEdit is a code editor for android tablets and smartphones. It is a powerful application that supports several languages including multiple versions of PYTHON. The application works best with the external keyboards like the Asus Transformer.

droidedit images

You can try the free version and can also purpose the paid version for SSH and SFTP support. Mentioned below are some features of this application.

System Features

  1. Supports more than dozens of languages including C, C++, Java, Python, etc.
  2. HTML files can easily be opened in a browser
  3. One can also import and open files directly from Dropbox.
  4. SL4A is supported in this application.
  5. There is support for character encoding
  6. The paid version includes secure shell and root mode and support to Dropbox and Drives and SFTP/FTP support.

Editor Feature

  1. There are several color themes options available
  2. Syntax highlighting is also available for clear perception of code
  3. You can undo or redo code for infinite times

Pricing

Basic Version – Free (Contain Ads)

Paid Version – $2

Final Verdict:

I hope you have found this article helpful to pick the best python editors and IDEs for Android. If yes, then please share this article with others too.


The monkeyrunner tool provides an API for writing programs that control an Android device or emulator from outside of Android code. With monkeyrunner, you can write a Python program that installs an Android application or test package, runs it, sends keystrokes to it, takes screenshots of its user interface, and stores screenshots on the workstation. The monkeyrunner tool is primarily designed to test applications and devices at the functional/framework level and for running unit test suites, but you are free to use it for other purposes.

The monkeyrunner tool is not related to the UI/Application Exerciser Monkey, also known as the monkey tool. The monkey tool runs in an adb shell directly on the device or emulator and generates pseudo-random streams of user and system events. In comparison, the monkeyrunner tool controls devices and emulators from a workstation by sending specific commands and events from an API.

The monkeyrunner tool provides these unique features for Android testing:

  • Multiple device control: The monkeyrunner API can apply one or more test suites across multiple devices or emulators. You can physically attach all the devices or start up all the emulators (or both) at once, connect to each one in turn programmatically, and then run one or more tests. You can also start up an emulator configuration programmatically, run one or more tests, and then shut down the emulator.
  • Functional testing: monkeyrunner can run an automated start-to-finish test of an Android application. You provide input values with keystrokes or touch events, and view the results as screenshots.
  • Regression testing - monkeyrunner can test application stability by running an application and comparing its output screenshots to a set of screenshots that are known to be correct.
  • Extensible automation - Since monkeyrunner is an API toolkit, you can develop an entire system of Python-based modules and programs for controlling Android devices. Besides using the monkeyrunner API itself, you can use the standard Python os and subprocess modules to call Android tools such as Android Debug Bridge.

    You can also add your own classes to the monkeyrunner API. This is described in more detail in the section Extending monkeyrunner with plugins.

The monkeyrunner tool uses Jython, an implementation of Python that uses the Java programming language. Jython allows the monkeyrunner API to interact easily with the Android framework. With Jython you can use Python syntax to access the constants, classes, and methods of the API.

Python code tester

A simple monkeyrunner program

Here is a simple monkeyrunner program that connects to a device, creating a MonkeyDevice object. Using the MonkeyDevice object, the program installs an Android application package, runs one of its activities, and sends key events to the activity. The program then takes a screenshot of the result, creating a MonkeyImage object. From this object, the program writes out a .png file containing the screenshot.

Android

The monkeyrunner API

The monkeyrunner API is contained in three modules in the package com.android.monkeyrunner:

  • MonkeyRunner: A class of utility methods for monkeyrunner programs. This class provides a method for connecting monkeyrunner to a device or emulator. It also provides methods for creating UIs for a monkeyrunner program and for displaying the built-in help.
  • MonkeyDevice: Represents a device or emulator. This class provides methods for installing and uninstalling packages, starting an Activity, and sending keyboard or touch events to an application. You also use this class to run test packages.
  • MonkeyImage: Represents a screen capture image. This class provides methods for capturing screens, converting bitmap images to various formats, comparing two MonkeyImage objects, and writing an image to a file.

In a Python program, you access each class as a Python module. The monkeyrunner tool does not import these modules automatically. To import a module, use the Python from statement:

where <module> is the class name you want to import. You can import more than one module in the same from statement by separating the module names with commas.

Running monkeyrunner

You can either run monkeyrunner programs from a file, or enter monkeyrunner statements in an interactive session. You do both by invoking the monkeyrunner command which is found in the tools/ subdirectory of your SDK directory. If you provide a filename as an argument, the monkeyrunner command runs the file's contents as a Python program; otherwise, it starts an interactive session.

The syntax of the monkeyrunner command is

Table 1 explains the flags and arguments.

Table 1.monkeyrunner flags and arguments.

ArgumentDescription
-plugin <plugin_jar> (Optional) Specifies a .jar file containing a plugin for monkeyrunner. To learn more about monkeyrunner plugins, see Extending monkeyrunner with plugins. To specify more than one file, include the argument multiple times.
<program_filename> If you provide this argument, the monkeyrunner command runs the contents of the file as a Python program. If the argument is not provided, the command starts an interactive session.
<program_options> (Optional) Flags and arguments for the program in <program_file>.

Python Code Runner For Android Free

monkeyrunner built-in help

You can generate an API reference for monkeyrunner by running:

The arguments are:

  • <format> is either text for plain text output or html for HTML output.
  • <outfile> is a path-qualified name for the output file.

Extending monkeyrunner with plugins

You can extend the monkeyrunner API with classes you write in the Java programming language and build into one or more .jar files. You can use this feature to extend the monkeyrunner API with your own classes or to extend the existing classes. You can also use this feature to initialize the monkeyrunner environment.

To provide a plugin to monkeyrunner, invoke the monkeyrunner command with the -plugin <plugin_jar> argument described in table 1.

In your plugin code, you can import and extend the main monkeyrunner classes MonkeyDevice, MonkeyImage, and MonkeyRunner in com.android.monkeyrunner (see The monkeyrunner API).

Note that plugins do not give you access to the Android SDK. You can't import packages such as com.android.app. This is because monkeyrunner interacts with the device or emulator below the level of the framework APIs.

The plugin startup class

Python Code Runner For Android

The .jar file for a plugin can specify a class that is instantiated before script processing starts. To specify this class, add the key MonkeyRunnerStartupRunner to the .jar file's manifest. The value should be the name of the class to run at startup. The following snippet shows how you would do this within an ant build script:

To get access to monkeyrunner's runtime environment, the startup class can implement com.google.common.base.Predicate<PythonInterpreter>. For example, this class sets up some variables in the default namespace: