简体   繁体   English

从脚本中终止android ASE shell

[英]Terminating android ASE shell from within the script

I'm using android scripting environment with python (ASE), and I'd like to terminate the shell executing the script when the script terminates. 我正在使用带有python(ASE)的android脚本环境,并且我想在脚本终止时终止执行该脚本的shell。 Is there a good way to do this? 有什么好方法吗?

I have tried executing on the last line: os.system( 'kill %d' % os.getppid() ) 我尝试在最后一行执行:os.system('kill%d'%os.getppid())

but to no avail. 但无济于事。

您应该使用android.exit()

我的猜测是上述答案应该是android.Android().exit()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM