Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 028ca87c52
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (22 sloc) 0.606 kb
""" Copy + Paste in Windows
"""
# found @ http://code.activestate.com/recipes/150115/
from .base import *
try:
import win32clipboard as clip
import win32con
except ImportError as why:
raise Pywin32NotFound
def copy(string):
"""Copy given string into system clipboard."""
clip.OpenClipboard()
clip.EmptyClipboard()
clip.SetClipboardData(1, string)
clip.CloseClipboard()
return
def paste():
"""Returns system clipboard contents."""
clip.OpenClipboard()
d = clip.GetClipboardData(win32con.CF_TEXT)
clip.CloseClipboard()
return d
Jump to Line
Something went wrong with that request. Please try again.