py2j /

Filename Size Date modified Message
11.4 KB
71 B
1.0 KB

py2j is a Python source to Java source compiler built specifically for expressing Android applications in Python and then using the Java based tool chain to build and deploy the Android applications.

Look in 'samples' directory to get an idea of what is currently possible.


For questions or discussion::

    Room: #py2j

How to setup your environment.

Your PYTHONPATH should include the main directory and the lib directory, also a new environment variable called PY2JLIB should point to the lib directory. For example::

    export PYTHONPATH=$PYTHONPATH:/home/lex/py2j/:/home/lex/py2j/lib
    export PY2JLIB=/home/lex/py2j/lib

If you like you can also add the bin directory to your PATH::

    export PATH=/home/lex/py2j/bin:$PATH

Now use py2j command to convert .py files to java files like so::

    $ py2j

This will create a directory called 'foo' with and any other classes you may have defined.