Accessing a single function written in Python with Java or C # that returns an array
I have one piece of code written in Python 3. Inside it I have this function:
def a_star(matrix, start, goal):
It uses these 2 libraries to work:
import numpy
from heapq import *
And returns an array.
But the program must have a graphical interface, and in a Python implementation it is complicated and ugly.
I just want to execute this function from another program (using Java or C #) How do I do this?
thank
+3
source to share
1 answer
Since all of these programming languages use their own programming models, it would be impossible to directly call any function written in one language from another language. In this case, however, if your Python application supports SOAP or HTTP service calls, you should still be able to achieve it.
0
source to share