python-3.x - 我想推出一款需要 Mame 的游戏
问题描述
我想通过 VPinballX.exe 启动 Diner.VPX 错误说 Diner.VPX 不是有效的 win32 应用程序
import subprocess
import os
FNULL = open(os.devnull, 'r')
filename = "C:/Visual Pinball/Tables/Diner.VPX"
args = "C:/Visual Pinball/VPinballX.exe -config " + filename
subprocess.call(args, stdout=FNULL, stderr=FNULL, shell=False)
解决方案
游戏可以通过os启动
import os
game = "C:/Visual Pinball/Tables/Diner.VPX"
os.startfile(game)