[Tutor] Python in Java [was Re: Tutor Digest, Vol 96, Issue 69]

Steven D'Aprano steve at pearwood.info
Fri Feb 17 01:28:18 CET 2012


Nicholas Palmer wrote:
> I am fairly experienced in java and I was wondering how to use java in
> python code, if you could give me any tips.\


My first tip is to learn how to use email effectively. Doing so will increase 
the chances that volunteers on mailing lists will answer your questions with 
respect instead of dismissing you as rude or incompetent or both.

(1) Please do not hijack existing threads for a new question, because your 
question may be missed or ignored by others. Always use your mail program's 
"Write Email" command (or equivalent) to ask a new question, not Reply or 
Reply All.

(2) That includes replying to message digests. Never use Reply unless you are 
actually *replying*.

(3) Always use Reply All to ensure a copy of your reply goes to the list, 
unless you wish to make a private (personal) comment to the person you are 
replying to.

(4) Always choose a sensible, meaningful subject line, such as "How to use 
Python with Java", and not "Re: [Tutor] Tutor Digest, Vol 96, Issue 69" or "Help".

(5) When replying, trim the irrelevant parts of the previous message. There is 
no need to include quotes of quotes of quotes of quotes going back through 
fifteen messages.

To answer your question about running Python in Java, there is an 
implementation of Python written in Java which has very high integration with 
the Java virtual machine and runtime libraries:

http://www.jython.org/

You might also try JPype, which promises Java to Python integration:

http://jpype.sourceforge.net/

or Jepp:

http://jepp.sourceforge.net/

or basically google for "python in java" or similar:

https://duckduckgo.com/html/?q=python%20in%20java



-- 
Steven


More information about the Tutor mailing list