python - 操作系统() | 对先前存在的命令提示符窗口执行命令 | Python
问题描述
Python
我目前在从先前打开的先前存在的命令提示符窗口运行命令方面遇到问题。这就是我到目前为止所得到的。
def start_batch_color():
os.system("cmd /k color 2") # Basic command, just filler code
def start_batch():
x1 = entry1.get()
os.system(x1) # Executes the command typed in the box
解决方案
推荐阅读
- docker - 如何从 Windows 的 docker 容器内部连接另一台机器?
- asp.net-core - 在launchSettings.json 中计算launchUrl?
- arrays - ReactJS Hooks 用另一个数组更新一个数组
- java - 升级到 java 12 后,使用什么语法以及用于 surefire 插件和 maven 的内容
- java - java.net.HttpURLConnection URL 中 userinfo 的安全隐患
- node.js - 适用于 Windows 7 的 NodeJS
- android - 可以将属性存储在存储库中以供重用吗?
- javascript - 如何获取背景图片的网址
- javascript - 让 useEffect 观察一个条件并让它只触发一次
- python - 我应该使用 html 将 html 页面链接在一起还是 python(flask) 更好