Trying to install module win32clipboard
Asked Answered
N

2

4

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.

Na answered 9/3, 2013 at 11:25 Comment(1)
What did you already try?Linlithgow
B
15

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.
Bonanza answered 9/3, 2013 at 11:54 Comment(3)
Dude i know that, what i don't know how to do is install it, i want to be able to use that code. That link you gave me has not helped a single bit, they are just a bunch of files many of which i don't need. I need a step by step how to install it. Running windows 7 x86.Na
Direct link to the file you need. Just install it and code above will work.Bonanza
Latest releases are now here: github.com/mhammond/pywin32/releasesChere
S
15

For those still here 7 years later

run this in your shell or cmd (assuming you added python to PATH, otherwise do that first)

pip install pywin32
Stenograph answered 16/5, 2020 at 10:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.