使用`os.system`函数
import osos.system('gnome-terminal -e "python3 /path/to/your/script.py"')
使用`subprocess`模块
from subprocess import PopenPopen(['open', '-a', 'Terminal', '-n'])
使用`os.startfile`函数(仅适用于Windows):
import osos.startfile('cmd.exe') 打开命令提示符os.startfile('powershell.exe') 打开PowerShell

使用`start`命令(仅适用于Windows):
import subprocesssubprocess.call('start /wait python /path/to/your/script.py', shell=True)
使用`open`命令(仅适用于macOS):
import subprocesssubprocess.call(['open', '-a', 'Terminal', '/path/to/your/script.py'])
