java執行指定的jpython函數(帶參數) 原

//PythonInterpreter interpreter ,python模擬器

java執行指定的jpython函數(帶參數)

PyFunction func = (PyFunction) interpreter.get(“func1”, PyFunction.class);
PyObject pyobj = func.__call__( Py.java2py(“param0”), Py.java2py(“param1”));

----------------------------------------

java給jpython變量賦值

interpreter.set(“變量名”, “變量值”);

java 從jpython獲取變量值

PyObject py = interpreter.get(“變量名”);

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章