Reputation: 19000
Is it possible to evaluate a string of python code (or Perl) from Java when developing Android applications?
I am trying to do something like evaluating a text-input script:
String script = text1.getText().toString();
String result = PythonRuntime.evaluate(script);
text2.setText(result);
Upvotes: 3
Views: 494
Reputation: 12339
In case you weren't aware of it, the Android Scripting Environment might be useful to you, though I don't think it does exactly what you're looking for.
Upvotes: 5
Reputation: 28409
Jython and its derivatives should be able to do this. See also Jythondroid.
Upvotes: 4