问题
Possible Duplicate:
Java Python Integration
There is some code written in Python and I need to use it from Scala. The code uses some native C. Is it possible to use this from Scala or Java without having to rewrite much?
I intend to use the code as a black-box without understanding, so I prefer not to look into it but rather to somehow generate a jar that I can import in my code.
回答1:
Why not try Jython?You directly compile python code to Java classes or call Python code from Java through interface.
来源:https://stackoverflow.com/questions/10882488/what-is-the-best-way-to-use-python-code-from-scala-or-java