Call and receive output from Python script in Java?
<p>What's the easiest way to execute a Python script from java, and receive the output of that script? I've looked for different libraries like Jepp or Jython, but most seem to be very out of date. Another problem with the libraries is that, because this is a school assignment, I need to be able to easily include a library with the source code (though I don't need to source for the library itself) if I use a library. </p>

<p>Because of this, would the easiest/most effective way be to simply do something like call the script with runtime.exec, and then somehow capture printed output? Or, even though it would be very painful for me, I could also just have the python script output to a temporary text file, then read the file in Java.</p>

<p>Note: the actual communication between Java and Python is not a requirement of the aforementioned assignment, so this isn't doing my homework for me. This is, however, the only way I can think of to easily perform what needs to be done. </p>
