📜  os.system 返回值 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:44.502000             🧑  作者: Mango

代码示例1
# code to perform a command line command and store out put in a variable
import subprocess as sp
command = "whoami"
output = sp.getoutput(command)
print(output)