[英]Evaluate a script (e.g. Python) in Java for Android platform
Is it possible to evaluate a string of python code (or Perl) from Java when developing Android applications? 在开发Android应用程序时,是否可以从Java评估一串python代码(或Perl)?
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);
如果您不了解它, Android脚本环境可能对您有用,但我认为它并不完全符合您的要求。
Jython and its derivatives should be able to do this. Jython及其衍生品应该能够做到这一点。 See also Jythondroid .
另见Jythondroid 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.