2

Is there a way to access (set, read etc.) the clipboard on Windows 7 64-bit in Python? I have seen PyWin32 but as far as I could see that was only 32-bit.

moinudin
  • 134,091
  • 45
  • 190
  • 216
Guy
  • 21
  • 2

4 Answers4

2

Download the amd64 version of pywin32 for 64bit support, have a look at here.

ismail
  • 46,010
  • 9
  • 86
  • 95
2

There only is one clipboard that is shared between all programs, whether they are 32 or 64 bit. In other words you can just use the same clipboard code on 64 bit Windows as you do on 32 bit.

EDIT: I've just read İsmail's answer and I wonder if that is in fact what the OP is struggling with. My statement above is still true, but I may have misinterpreted the question.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
1

The pyperclip.py module has cross-platform support for simple text copying/pasting.

http://coffeeghost.net/2010/10/09/pyperclip-a-cross-platform-clipboard-module-for-python/

Al S.
  • 361
  • 3
  • 4
0

The easiest method I've seen is demonstrated in this post: How do I copy a string to the clipboard on Windows using Python?

It uses Tkinter, which is in the python standard library.

Community
  • 1
  • 1
Buttons840
  • 9,239
  • 15
  • 58
  • 85