AminetAminet
Search:
85303 packages online
About
Recent
Browse
Search
Upload
Setup
Services

dev/lang/micropython.lha

Mirror:Random
Showing: m68k-amigaos icongeneric icon
No screenshot available
Short:MicroPython interpreter for Amiga68k
Author:Fabrice LABATUT
Uploader:fabrice labatut club-internet fr
Type:dev/lang
Version:1.28.0-build237
Architecture:m68k-amigaos >= 3.0
Date:2026-05-11
Requires:2 MB RAM (4 MB recommended for networking/TLS)
Replaces:dev/lang/micropython.lha
Distribution:Aminet
URL:https://github.com/OoZe1911/micropython-amiga-port
Download:dev/lang/micropython.lha - View contents
Readme:dev/lang/micropython.readme
Downloads:937

MicroPython for AmigaOS (m68k)
==============================

A port of MicroPython v1.28 (compatible Python 3.4) to AmigaOS,
targeting Motorola 68020+ processors. Runs on classic Amiga hardware
(A1200, A3000, A4000) and emulators (WinUAE, FS-UAE).

This port was developed by Fabrice with coding assistance from Claude
(Anthropic's AI), under Fabrice's direct supervision: architecture
decisions, implementation strategy, testing on real hardware/emulator,
and bug reports are all driven by Fabrice. Every change is reviewed
and validated before being committed.


Requirements
------------

  - AmigaOS 3.0 or higher
  - Motorola 68020 CPU or higher
  - 2 MB RAM minimum for simple scripts
  - 4 MB RAM recommended for networking and TLS
  - AmiSSL (optional, required for HTTPS/TLS support)


Usage
-----

  micropython                        ; interactive REPL
  micropython script.py              ; run a Python script
  micropython script.mpy             ; run precompiled bytecode
  micropython -c "print(2**32)"      ; run inline code
  micropython -m 512 script.py       ; run with 512 KB heap

The default heap size is 128 KB. Use -m to allocate more memory
(in KB). For example, downloading a web page may require 4 MB
of heap: micropython -m 4096 script.py

Press Ctrl-C at any time to interrupt a running script or a
time.sleep() call.


Features
--------

  Core Python
  - Full Python 3.4 compatibility (ROM_LEVEL_EVERYTHING): f-strings,
    set operations, OrderedDict, advanced slicing, descriptors,
    async/await
  - Interactive REPL with readline support (cursor keys, history)
  - Script execution, inline code (-c), configurable heap (-m)
  - Precompiled bytecode: import and run .mpy files compiled with
    mpy-cross, or run them directly (micropython script.mpy)
  - Ctrl-C (KeyboardInterrupt) during scripts, loops, time.sleep()
  - input() builtin, sys.stdin/stdout/stderr streams

  Modules
  - re, json, math, struct, binascii, base64, time, datetime,
    random, hashlib (sha256), errno, platform, socket, ssl,
    urequests, deflate, gzip, zlib, zipfile, arexx, gc, sys, io

  Filesystem
  - Full open/read/write/close via VFS_POSIX
  - os.listdir, getcwd, chdir, mkdir, rmdir, remove, rename, stat,
    chmod, getprotect, setprotect, makedirs, walk, getenv, putenv,
    unsetenv
  - os.path with AmigaOS volume:path conventions

  Networking
  - TCP/UDP sockets, DNS resolution via bsdsocket.library
  - urequests HTTP client: HTTP/1.1, chunked encoding, gzip
  - HTTPS via AmiSSL (requires amissl.library on the Amiga)

  AmigaOS native
  - amiga.intuition: native modal requesters via intuition.library
    -- easy_request(title, body, buttons) generic dialog
    -- auto_request(body, yes, no) yes/no confirmation
    -- message(body, button) single-button notice
  - amiga.asl: native file requester via asl.library
    -- file_request(**kwargs) with save mode, multi-select,
       pattern filter, drawers-only mode
  - arexx: send(), exists(), ports(), Port() persistent client
    for IPC with AmigaOS applications (IBrowse, Directory Opus...)
  - platform.amiga_info(): CPU, FPU, chipset, Kickstart, memory

  All Amiga modules are Latin-1 aware and handle UTF-8/Latin-1
  conversion transparently.


AmigaOS Path Conventions
------------------------

AmigaOS uses ":" to separate volumes from paths and "/" for
subdirectories:

  >>> import os
  >>> os.getcwd()
  'DH0:Work'
  >>> os.path.join("DH0:", "work", "scripts")
  'DH0:work/scripts'
  >>> os.path.isabs("DH0:file.py")
  True


Release history
---------------

Build 237
  - New module amiga.asl: native file requester via asl.library.
    file_request() supports save mode, multi-select (returns
    list[str]), pattern filter, and drawers-only mode.

Build 234
  - New module amiga.intuition: modal Workbench requesters via
    intuition.library's EasyRequest. Three functions:
    easy_request() for custom dialogs, auto_request() for yes/no
    confirmations, message() for single-button notices.

Build 230
  - Rebased on MicroPython 1.28: PEP 750 template strings,
    nested f-strings, updated event-waiting API.
  - Fix: Ctrl-C during a blocking socket call (accept, recv,
    connect, send, sendto, recvfrom) no longer crashes the VM.

Build 227
  - Full Latin-1 <-> UTF-8 round-trip for filenames and terminal
    output. Accented characters now work transparently in
    os.listdir, open, and print.

Build 219
  - Fix: m68k alignment crash on for loops, list comprehensions,
    unpacking, and builtins (sum, min, max, sorted).
  - Fix: arexx.send() now interruptible by Ctrl-C.
  - Various stability fixes (SSL fd, inet_ntoa, locale caching).

Build 209
  - Environment variables: os.getenv, os.putenv, os.unsetenv.
  - New modules: zlib, zipfile.
  - Timezone support via locale.library; strftime in time and
    datetime.
  - input(), sys.stdin/stdout/stderr.
  - os.chmod accepts Unix-style modes (0o755, etc.).

Build 186
  - First ARexx IPC module.
  - Ctrl-C in scripts and time.sleep().
  - Direct .mpy execution from command line.

Build 169
  - Initial release.


Known Limitations
-----------------

  - time.ticks_ms() returns 0 (no high-res timer yet)
  - hashlib only supports SHA256
  - Sockets are always blocking
  - No multithreading
  - re module: {n} quantifiers are not supported (use explicit
    repeated characters instead, e.g. "..." instead of ".{3}")


Source Code
-----------

The full source code is available on GitHub:
https://github.com/OoZe1911/micropython-amiga-port

Latest build can be downloaded here:
https://github.com/OoZe1911/micropython-amiga-port/blob/main/ports/amiga/build/micropython


License
-------

MicroPython is licensed under the MIT License.


Contents of dev/lang/micropython.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[Amiga]                   1171    1484  78.9% -lh5- 78b3 Apr  7 10:06 micropython.info
[Amiga]                 227081  423708  53.6% -lh5- e400 Apr 24 10:31 micropython/micropython
[Amiga]                   2879    6136  46.9% -lh5- 5004 May 11 16:57 micropython/micropython.readme
[Amiga]                   1171    1484  78.9% -lh5- 7b3b Apr  7 10:06 micropython/samples.info
[Amiga]                  11089   38378  28.9% -lh5- 26dd Apr 14 10:38 micropython/samples/aminet_tools.py
[Amiga]                   4606   14847  31.0% -lh5- 5d0f Apr  9 11:18 micropython/samples/chat_claude.py
[Amiga]                   3339   10612  31.5% -lh5- 77eb Apr  7 17:07 micropython/samples/diff_view.py
[Amiga]                   4386   14182  30.9% -lh5- f9d4 Apr 13 16:05 micropython/samples/http_util.py
[Amiga]                    937    2268  41.3% -lh5- de1b Apr  7 15:54 micropython/samples/launch_ibrowse.py
[Amiga]                   2619    5944  44.1% -lh5- 1ce9 Apr  9 15:13 micropython/samples/samples.readme
[Amiga]                   1265    3252  38.9% -lh5- 2a9c Apr 24 10:31 micropython/samples/test_asl.py
[Amiga]                   5952   20166  29.5% -lh5- ce21 Apr  7 15:22 micropython/samples/webserver.py
[Amiga]                    691    1535  45.0% -lh5- b3b4 Apr 13 16:05 micropython/samples/wget.py
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        13 files  267186  543996  49.1%            May 11 23:09
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>