GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Acode-Foundation/acode-plugin-python: Acode plugin to run python code

BranchesTags
Open more actions menu

Latest commit

 

History

33 Commits
33 Commits

Folders and files

NameName
Last commit message
Last commit date
.vscode
.vscode
 
 
src
src
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
biome.json
biome.json
 
 
changelog.md
changelog.md
 
 
esbuild.config.mjs
esbuild.config.mjs
 
 
icon.png
icon.png
 
 
pack-zip.js
pack-zip.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
plugin.json
plugin.json
 
 
plugin.zip
plugin.zip
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Python for Acode

Run Python 3.14 in the Acode editor on Android. Python runs on your device through Pyodide, so no server or Termux setup is needed.

Features

  • Run Python files: open a .py file and tap the run button in the header
  • Interactive console: type Python after your program finishes; input() works too
  • Python packages: import numpy, pandas, matplotlib and many more are downloaded automatically the first time you use them
  • Install from PyPI with micropip
  • Plots and images: matplotlib figures and Pillow images are shown right in the console
  • pygame (experimental): games draw to a canvas in the console
  • Copy output: console text can be selected and copied
  • Line wrap: toggle wrapping of long output lines from the header button
  • Progress indicator: a thin line under the header shows while Python is loading or your code is running

Usage

Open a Python file and tap the run button. The console shows your program's output, errors in red, and a prompt for input().

After the program finishes, you can keep typing Python in the console. Use the up and down arrows to browse previous commands and Ctrl+L to clear the console.

Packages

Packages built for Pyodide (numpy, pandas, scipy, matplotlib, Pillow and many more) load automatically when imported. They are downloaded the first time, so an internet connection is needed then.

Pure Python packages from PyPI can be installed with micropip:

import micropip
await micropip.install("snowballstemmer")

import snowballstemmer
print(snowballstemmer.stemmer("english").stemWords(["running", "jumps"]))

Plots and images

plt.show() displays matplotlib figures in the console, and any figures still open are shown when the program ends. Figures default to the width of the console and are rendered sharp on high-density screens. Pillow's Image.show() works too.

import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(0, 2 * np.pi, 200)
plt.plot(x, np.sin(x), label="sin(x)")
plt.legend()
plt.show()

pygame (experimental)

pygame programs draw to a canvas in the console using Pyodide's SDL support. Ordinary game loops work as written:

import pygame

pygame.init()
screen = pygame.display.set_mode((1280, 720))
clock = pygame.time.Clock()
running = True

while running:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False

    screen.fill("purple")
    pygame.display.flip()
    clock.tick(60)

pygame.quit()
  • The display runs your program on Acode's main page instead of the isolated worker, so it could access the app and its data. The plugin asks before doing this (you can choose not to be asked again); only allow it for code you trust.
  • Blocking loops like this need Android System WebView 137 or newer (JSPI support). On older WebViews, make the loop async with await asyncio.sleep(0) each frame.
  • Running again or closing the console stops the game.
  • If SDL cannot start, the program runs without a display and the console explains why.

Limitations

  • Only the open file runs; importing your other .py files is not supported yet.
  • Code runs in the browser sandbox: no access to device files outside Python's in-memory file system, and no subprocess or threads.
  • Packages with native code must be built for Pyodide; others cannot be installed with micropip.
  • Requires a recent Android System WebView.

Development

npm install
npm run dev        # watch, serve on :3000, rebuild plugin.zip
npm run build      # bundle and write plugin.zip
npm run check      # lint and format check (Biome)

In Acode, install from Plugins → + → Remote using http://<your-ip>:3000/plugin.zip.

See changelog.md for release notes.

About

Acode plugin to run python code

Resources

Readme
Activity
Custom properties

Stars

218 stars

Watchers

18 watching

Forks

111 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.