Python, Pyinstaller creating shortcuts in windows

心不动则不痛 提交于 2019-12-23 12:43:42

问题


I am making a python script that creates a shortcut (.lnk) file, using win32com.client module, I am using pyinstaller to convert it to exe. I'm also using Tkinter, so I need --tk support in pyinstaller. Pyinstaller doesn't seem to work with --tk and import win32com.client at the same time (I have no idea why) I need this to work. Maybe there's a way to create shortcuts without win32com.client (I've searched a lot without success) or to make pyinstaller work (I foud an issue between win32com.client and pyinstaller here , but the patch did't solved my problem) Thanks!


回答1:


If anyone is interested, I found a way of creating shortcuts using win32com.shell rather than win32.client.
This works well with pyinstaller and --tk flag set to ON.



来源:https://stackoverflow.com/questions/6673041/python-pyinstaller-creating-shortcuts-in-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!