0

I have a couple of python scripts whose methods I'd like to access from Java. These functions take a string as a parameter and also return a string. What would be a simple and effective way to do that?

My python codes don't run under jython. With jython, I get loads of errors for simple things like:

'with' will become a reserved keyword in Python 2.6

However, I am able to create .so objects using cython. Could that be used from Java?

gat
  • 2,872
  • 2
  • 18
  • 21

1 Answers1

0

You will need to wrap the functions in a command line executable that outputs the desired result. Then you can use ProcessBuilder to call the script and get the output.

spinlok
  • 3,561
  • 18
  • 27