Python生成快捷方式

电脑技术 电脑技术 1626 人阅读 | 0 人回复 | 2022-05-01

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

x
  1. import os, winshell
  2. desktop = winshell.desktop()
  3. path = os.path.join(desktop, "myNeatWebsite.url")
  4. target = "http://www.google.com/"
  5. shortcut = file(path, 'w')
  6. shortcut.write('[InternetShortcut]\n')
  7. shortcut.write('URL=%s' % target)
  8. shortcut.close()
复制代码


您需要登录后才可以回帖 登录 | 立即注册

本版积分规则