K12教育赛事综合服务平台
聚乐之家官方网站
下载聚乐之家官方App
专注青少年竞赛题库网站
例如执行git status并获取所有输出内容和命令执行结果
git status
使用os.system("外部命令")
os.system("外部命令")
使用subprocess.run("外部命令", shell=True, capture_output=True, text=True)
subprocess.run("外部命令", shell=True, capture_output=True, text=True)
直接调用print("外部命令")
print("外部命令")
使用os.popen("外部命令").read()
os.popen("外部命令").read()