Get And Set Windows Clipboard
Join the DZone community and get the full member experience.Join For Free
From June Kim's recipe.
import win32clipboard as w import win32con def getText(): w.OpenClipboard() d=w.GetClipboardData(win32con.CF_TEXT) w.CloseClipboard() return d def setText(aType,aString): w.OpenClipboard() w.EmptyClipboard() w.SetClipboardData(aType,aString) w.CloseClipboard()
Opinions expressed by DZone contributors are their own.