I'm trying to figure out chaquopy and understand how to call a function without arguments, but for my application I need to call a function with a String argument taken from EditText. How can I write this?
val py: Python = Python.getInstance()
val pyObj: PyObject = py.getModule("script")
CoroutineScope(Dispatchers.Main).launch {
for (i in 1..1000000) {
val integral: PyObject = pyObj.callAttr("main",function.toString() )
setLatex(sText, integral.toString())
delay(200)
}
import sympy as sym
from sympy import *
def main(function):
return sym.latex(function)