willsonlincake 发表于 2022-5-1 19:18:39

Python生成快捷方式

import os, winshell
desktop = winshell.desktop()
path = os.path.join(desktop, "myNeatWebsite.url")
target = "http://www.google.com/"
shortcut = file(path, 'w')
shortcut.write('\n')
shortcut.write('URL=%s' % target)
shortcut.close()

页: [1]
查看完整版本: Python生成快捷方式