【问题标题】:Is there a python code to completely exit the termux terminal? [duplicate]是否有 python 代码可以完全退出 termux 终端? [复制]
【发布时间】:2021-02-08 09:39:55
【问题描述】:

在此之前只退出手头的脚本,而不是整个终端。我试过了:

import os
os.system('exit')

这只会退出脚本。知道如何退出整个终端吗?

【问题讨论】:

标签: python-3.x terminal termux


【解决方案1】:

在脚本中仅使用 exit。像上面提到的命令一样退出终端就足够了。

【讨论】:

    【解决方案2】:

    是的 如果你想退出python类型exit()如果你想退出终端类型exit

    【讨论】:

      猜你喜欢
      • 2018-05-25
      • 1970-01-01
      • 2022-07-18
      • 2021-04-26
      • 2020-09-28
      • 2015-04-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多