首页 > 解决方案 > 操作系统() | 对先前存在的命令提示符窗口执行命令 | 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

标签: pythoncommand-promptpython-os

解决方案


推荐阅读