Skip to content

Instantly share code, notes, and snippets.

@gschizas
Created August 30, 2013 19:09
Show Gist options
  • Save gschizas/6393269 to your computer and use it in GitHub Desktop.
Save gschizas/6393269 to your computer and use it in GitHub Desktop.
Interact with windows clipboard
import win32clipboard
# set clipboard data
win32clipboard.OpenClipboard()
win32clipboard.SetClipboardText('testing 123')
win32clipboard.CloseClipboard()
# get clipboard data
win32clipboard.OpenClipboard()
data = win32clipboard.GetClipboardData()
win32clipboard.CloseClipboard()
print(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment