我知道如何run a Python script in the terminal。 相反,如何在 Python 脚本中运行终端脚本?
我想在终端中运行 file.py 并让它在新的终端窗口上执行命令。
def run_in_terminal(command):
need code here that opens the terminal and runs command in terminal
terminal_script = some command to run in terminal
run_in_terminal(terminal_script)