Evaluate a script (like Python) in the Android Java platform

Is it possible to evaluate a line of Python (or Perl) code from Java when developing Android apps?

I'm trying to do something like evaluating a text input script:

String script = text1.getText().toString();
String result = PythonRuntime.evaluate(script);
text2.setText(result);

      

+2


source to share


2 answers


If you weren't aware of this, the Android Scripting Environment might be useful for you , although I don't think it does exactly what you're looking for.



+4


source


Jython and its derivatives should be able to do this. See also Jythondroid .



+4


source







All Articles