Skip to content

Ethosa/py2java

Repository files navigation

Python to Java language Translator

This library uses the Translator class from retranslator library.

Installing: pip install py2java

import:

from py2java import PythonToJava

Usage:

sourceText = """
sourceText = "test"
def main():
    print(sourceText)
class lol(object):
    \"\"\"docstring for lol\"\"\"
    _LOL = "test" # test variable
"""
translator = PythonToJava(useRegex=1)
print(translator.compile(sourceText))

using java controller:

jc = PythonToJava(useRegex=1, javaVersion=8) # standart javaVersion is 10

About

Python to Java language translator.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages