免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2578 | 回复: 1
打印 上一主题 下一主题

python 3.2.2快捷方式指示到底是什么地方(win7) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-11-06 20:05 |只看该作者 |倒序浏览
因为要将一个后缀.py的文件固定用python(GUI)来打开,所以要找下GUI的实际地址(已经测试用链接文件打不开,不知道什么原因)
但在链接文件指示的地方并没有目标程序,当然点击链接是正常的,怎么才能找的GUI的实际地址?又或者怎么才能将.py文件直接绑定用GUI来打开?

论坛徽章:
0
2 [报告]
发表于 2012-07-14 09:58 |只看该作者
本帖最后由 anonymous0502 于 2012-07-14 09:58 编辑

pythonw.exe

Python scripts (files with the extension .py) will be executed by python.exe by default. This executable opens a terminal, which stays open even if the program uses a GUI. If you do not want this to happen, use the extension .pyw which will cause the script to be executed by pythonw.exe by default (both executables are located in the top-level of your Python installation directory). This suppresses the terminal window on startup.

You can also make all .py scripts execute with pythonw.exe, setting this through the usual facilities, for example (might require administrative rights):

Launch a command prompt.

Associate the correct file group with .py scripts:

assoc .py=Python.File
Redirect all Python files to the new executable:

ftype Python.File=C:\Path\to\pythonw.exe "%1" %*
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP