Trying to install module win32clipboard

六月ゝ 毕业季﹏ 提交于 2020-01-02 05:21:09

问题


I'm new to python and i'm trying to install win32clipboard to be able to use this code:

import win32clipboard
win32clipboard.OpenClipboard()
win32clipboard.SetClipboardText('testing 123')
win32clipboard.CloseClipboard()

# get clipboard data
win32clipboard.OpenClipboard()
data = win32clipboard.GetClipboardData()
win32clipboard.CloseClipboard()
print data
raw_input()

How do i exactly install the necessary module to be able to do so? I'm using python version 2.72.


回答1:


This module is part of pywin32 module.

To install:

  1. Go to http://sourceforge.net/projects/pywin32/files/pywin32/
  2. Choose the latest build, e.g.: http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/
  3. Download the installer for your system, e.g.: pywin32-219.win-amd64-py2.7.exe
  4. Run the installer.
  5. Use the Python you've installed it for to run your win32clipboard script.


来源:https://stackoverflow.com/questions/15310121/trying-to-install-module-win32clipboard

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