Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close
====
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.

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.