Usage of Py4J

20 views
Skip to first unread message

Evelyn

unread,
Nov 12, 2024, 8:28:22 AM11/12/24
to Py4J Support and Comments
Hello, 
I am very unfamiliar with Java, but comfortable with CPython. I have several C-based Python scripts, with several dependencies each, which need to be used with a piece of software that only interprets Java-based Python (Jython) and not CPython. Obviously, re-writing these scripts would take years. Is Py4J something could aid in this project?

Jonah Graham

unread,
Nov 12, 2024, 8:56:04 AM11/12/24
to py...@py4j.org
Hi Evelyn,

At a high level I would say that yes Py4J would do the trick. Py4J makes it relatively easy to interoperate between a CPython and Java process and do remote calls (RPC) between them, especially if there is a Java API you are trying to access from Python. 

However, if you don't have the source for the Java side and the Java side doesn't have a published API, this may be difficult. 

Are you looking to run Jython scripts, or access other things on the Java side? 

Jonah
~~~
Jonah Graham (he/him)
Kichwa Coders
www.kichwacoders.com


On Tue, 12 Nov 2024 at 08:28, Evelyn <fuhrma...@gmail.com> wrote:
Hello, 
I am very unfamiliar with Java, but comfortable with CPython. I have several C-based Python scripts, with several dependencies each, which need to be used with a piece of software that only interprets Java-based Python (Jython) and not CPython. Obviously, re-writing these scripts would take years. Is Py4J something could aid in this project?

--
You received this message because you are subscribed to the Google Groups "Py4J Support and Comments" group.
To unsubscribe from this group and stop receiving emails from it, send an email to py4j+uns...@py4j.org.
To view this discussion visit https://groups.google.com/a/py4j.org/d/msgid/py4j/40ab4b29-ab71-4d6c-b7ce-286f443a6059n%40py4j.org.
Reply all
Reply to author
Forward
0 new messages