Welcome to Jia Mini Python documentation

Version 2.0 released 11 January 2014

Jia Mini Python provides an implementation of a useful subset of Python syntax and types in Java and Objective C. The sweet spot is where you need a DSL (eg expressions, variables, conditionals, methods/macros, callbacks) and would like to use Python’s syntax and types (eg heterogeneous lists and dicts). Think of it as adding those things to JSON rather than cutting down Python.

It was originally written in order to have a richer configuration file for an Android app library. For example you could make the brightness setting have a value of 7 except on Thursday afternoons, unless the program has been running for 24 hours.

If you are looking for a fuller implementation of Python then try the Jython Project for Java, or regular CPython.

Jia Mini Python is hosted at https://github.com/rogerbinns/jia-mini-python

Works with Java 1.5+, and iOS/MacOS with Clang and ARC. You need Python 2.6+/3.1+ on a host computer to translate Python text into the bytecode used.

As a JAR file Jia Mini Python comes in at 32kb, Rhino (Javascript interpreter) comes in at 1.1MB or more and various Lua implementations are at least ½ MB. x86 CPython is over 1½ MB (plus numerous extra files), while Objective C Jia Mini Python is under 100kb. Jia Mini Python doesn’t include a language parser or REPL as you use jmp-compile to do the parsing. This keeps things small - just the way we like it.

Contents:

Indices and tables

Table Of Contents

Next topic

Example

This Page