Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有回调的 daemon.py。我应该如何让处理函数执行操作系统命令?
当我前段时间学习 Python 时,我使用过:
import os os.system('ls -lt')
但似乎在 Python 3.x 中,推荐使用命令或os.popen()