My favorites | Sign in
Project Logo
                
Code license: GNU General Public License v2
Labels: python, java
Show all Featured downloads:
java2python-0.2.tar.gz
People details
Project owners:
  troy.melhase
Project committers:
lilingv

Simple but effective tool to translate java source code into python source code.

'Hello, world.' example:

$ cat HelloWorldApp.java
class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println('Hello, world.');
        System.out.println(args);
    }
}

$ j2py -i HelloWorldApp.java
#!/usr/bin/env python
# -*- coding: utf-8 -*-

class HelloWorldApp(object):
    ''' generated source for HelloWorldApp

    '''
    @classmethod
    def main(cls, args):
        print 'Hello, world.'
        print args

if __name__ == '__main__':
    import sys
    HelloWorldApp.main(sys.argv)








Hosted by Google Code