Skip to content

epowers/java2python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple but effective tool to translate Java source code into Python.

Here's a quick example. First, the Java source:

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

Next, we translate:

$ 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)

About

Simple but effective library to translate Java source code to Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 80.8%
  • Java 19.0%
  • Shell 0.2%