views:

134

answers:

2

Is it possible to evaluate a string of python code (or Perl) from Java when developing Android applications?

I am try to do something like evaluating a text-input script:

e.g.

String script = text1.getText().toString();
String result = PythonRuntime.evaluate(script);
text2.setText(result);
+4  A: 

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

jsight
+4  A: 

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.

retracile
Not really what I'm looking for.
Soni Ali