Python 2.7 Python控制台中没有输出的Python启动批处理文件

Python 2.7 Python控制台中没有输出的Python启动批处理文件,python-2.7,batch-file,Python 2.7,Batch File,。。使用参数我希望批处理文件打开自己的控制台,并在完成时关闭它 os.startfile(path, param) >> WindowsError: [Error 1155] No application is associated with the specified file for this operation: 将文件从*.bat更改为*.cmd。我在执行*.bat文件之前遇到过一些问题,通过将其设置为*.cmd文件解决了这些问题。在您的例子中,问题与您的系统与*.bat扩

。。使用参数
我希望批处理文件打开自己的控制台,并在完成时关闭它

os.startfile(path, param)
>> WindowsError: [Error 1155] No application is associated with the specified file for this operation:

将文件从*.bat更改为*.cmd。我在执行*.bat文件之前遇到过一些问题,通过将其设置为*.cmd文件解决了这些问题。在您的例子中,问题与您的系统与*.bat扩展相关联的可执行文件有关。特别是,Python找不到任何关联(即使它应该是cmd.exe)


这两种文件类型之间的差异很微妙,在中得到了很好的探讨。

changed.bat to.cmd get same error os.startfile(path)可以工作,但我需要参数