【发布时间】:2013-07-03 02:48:25
【问题描述】:
对于 Linux 上的 python,我使用#!/usr/bin/python -tt 来发出错误。我如何在 Windows 7 上执行此操作?我试过这个:
#!c:\python33\python -tt
这是正确的吗?
【问题讨论】:
对于 Linux 上的 python,我使用#!/usr/bin/python -tt 来发出错误。我如何在 Windows 7 上执行此操作?我试过这个:
#!c:\python33\python -tt
这是正确的吗?
【问题讨论】:
Windows 不支持“hashbang”语法。可以通过Vinay Sajip的pylauncher获得一些支持,不知道是否支持添加参数。
也许可以在 ftype 设置中添加参数。见this question。
如果不是,您可能必须创建一个 .bat 文件来添加参数并关联该 bat 文件。
【讨论】: