title: Using Python from within Java
body: <blockquote>
  <p><strong>Possible Duplicate:</strong><br />
  <a href="https://stackoverflow.com/questions/1119696/java-python-integration">Java Python Integration</a></p>
  </blockquote>
  <p>I have a large existing codebase written in 100% Java, but I would like to use Python for some new sections of it. I need to do some text and language processing, and I'd much rather use Python and a library like <a href="http://www.nltk.org" rel="nofollow noreferrer" title="NLTK - The Natural Language Toolkit">NLTK</a> to do this.</p>
  <p>I'm aware of the Jython project, but it looks like this represents a way to use Java and its libraries from within Python, rather than the other way round - am I wrong about this?</p>
  <p>If not, what would be the best method to interface between Java and Python, such that (ideally) I can call a method in Python and have the result returned to Java?</p>