Source

py2j /

Filename Size Date modified Message
bin
lib
py2j
samples
11.1 KB
71 B
1012 B
====
py2j
====

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.

IRC
---

For questions or discussion::

    Server: chat.freenode.net
    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 foo.py

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