Skip to content

Commit

Permalink
Merge branch 'release/v0.2.1' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth Reitz committed Sep 9, 2010
2 parents 57ed051 + c47703b commit 59de660
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -17,8 +17,8 @@ def publish():
sys.exit()

setup(name='xerox',
version='0.2.0',
description='Python wrapper for Gist API',
version='0.2.1',
description='Simple Copy + Paste in Python.',
long_description=open('README.rst').read(),
author='Kenneth Reitz',
author_email='me@kennethreitz.com',
Expand Down
29 changes: 13 additions & 16 deletions xerox/win.py
Expand Up @@ -4,32 +4,29 @@
# found @ http://code.activestate.com/recipes/150115/

try:
import win32clipboard as w
import win32clipboard as clip
import win32con
except ImportError, why:
raise Pywin32NotFound


def copy(string):
"""Copy given string into system clipboard."""
try:
pass
except Exception, e:
raise e
w.OpenClipboard()
w.EmptyClipboard()
w.SetClipboardData(1, string)
w.CloseClipboard()

clip.OpenClipboard()
clip.EmptyClipboard()
clip.SetClipboardData(1, string)
clip.CloseClipboard()

return


def paste():
"""Returns system clipboard contents."""
try:
pass
except Exception, e:
raise e
w.OpenClipboard()
d=w.GetClipboardData(win32con.CF_TEXT)
w.CloseClipboard()

clip.OpenClipboard()
d = clip.GetClipboardData(win32con.CF_TEXT)
clip.CloseClipboard()
return d


0 comments on commit 59de660

Please sign in to comment.