15 lines
263 B
Python
Executable File
15 lines
263 B
Python
Executable File
|
|
|
|
def call_cpython(module, function, args = []):
|
|
j=__getJep()
|
|
f = "function_" + j.hashCode()
|
|
eval_cpython("from " + module + " import " + function + " as " + f)
|
|
return j.invoke(f, args)
|
|
|
|
|
|
|
|
call_cpython("numpy", "ones", [(2,3)])
|
|
|
|
|
|
|