[Tutor] Embedding

Kent Johnson kent37 at tds.net
Tue Sep 27 19:42:14 CEST 2005

Joseph Quigley wrote:
> hi,
> I'm working on a game with other friends who don't use python. However 
> they'd like to use Java Python and C/C++. I was wondering if I could 
> embedd C in a Python program in Jython and lastly in java (or the other 
> way arround). My goal is: Can these for languages be used to make one 
> program?

Not easily. You can embed C in Java with JNI. You can access the result from Jython. But the original requirement seems a bit weird - why Java and C in one program? ISTM you should pick Python/C or Jython/Java but not both. Can you say more about what you are trying to accomplish?

(By "Java Python" do you mean "Java AND Python" or "the Java version of Python" e.g. Jython?)


More information about the Tutor mailing list