Transpiles Java source code into Python source code
Project description
JavaToPythonTranspiler
Transpiles Java source code into Python source code
Installation
NotImplemented
Functions
java_to_python_from_string
java_to_python_from_string(user_input: str) -> str | TranspilerFailure
This is the primary function provided by this library.
This function takes in a String (user_input
) and transpiles it into a
result.
This function will return either a String (which is the python source), or
it may fail, and return a TranspilerFailure
object. This object contains a
singular field, error_message
, which is a String representing the error
that occurred.
java_to_python_from_file
java_to_python_from_file( file_path: Optional[str] = None, file_object: Optional[TextIOWrapper] = None ) -> str | TranspilerFailure
This function is the secondary purpose of this library; it allows one to transpile the contents of a file (of java source code) to Python source.
file_path
(optional) is a String that defaults to None; if set to None,
then file_object
must have a value.
file_object
(optional) is a TextIOWrapper that defaults to None; if set
to None, then file_path
must have a value.
if both file_path
and file_object
each have a value of None, then a
ValueError will be thrown.
Data
TranspilerFailure
This class represents a failure that occurred in the Transpiler.
error_message: str
error_message
represents the error that occurred; it is a String of
information that informs the user what went wrong.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for java_to_python_transpiler-0.1.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 273f4c351730c03f12bed9441d6a1f288ce93afe1917bf3fb8adda4f0e26ed9c |
|
MD5 | 7c4d4fd6ad05c117c1a1d496d0451fd5 |
|
BLAKE2b-256 | d98ca9ef7e43db3188f23930823670bdabee2c106e0d145cd4c8789deda6f424 |
Hashes for java_to_python_transpiler-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c9e26dae1f93ad269191d76440ee4c53ceeba5affbf6b37f1dcbadf15a9b881 |
|
MD5 | 776471d2918a3a1d9cf92afd6d2672da |
|
BLAKE2b-256 | 6ca34f5b691a83dda7d1a9881a7909d2cef07c7f075b99f617698bb4ec7b93b7 |