赞
踩
首先得安装 ActiveState ActivePython . 因为这个中带了 winshell 库
- from os import path
- import winshell
-
-
- #----------------------------------------------------------------------
- def create_shortcut_to_desktop(target,title):
- """Create shortcut to desktop"""
- s = path.basename(target)
- fname = path.splitext(s)[0]
- winshell.CreateShortcut(
- Path = path.join(winshell.desktop(), fname + '.lnk'),
- Target = target,
- Icon=(target, 0),
- Description=title)
注:不支持win64
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。