[英]How to open a CMD window using python code
I want to open a cmd window using Python.我想使用 Python 打开一个 cmd window。 I think I can use os library but I don't know how.我想我可以使用 os 库,但我不知道如何。
Similar to Python: Start new command prompt on Windows and wait for it finish/exit类似于Python:在 Windows 上启动新的命令提示符并等待它完成/退出
import os
os.system("start /wait cmd /c cmd")
Should do the trick!应该做的伎俩!
import os
os.system("start cmd.exe")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.