Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Tk_windows_clipboard.py
- import os
- from Tkinter import Tk
- root = Tk()
- filename = os.path.join(os.path.expanduser('~'),'tempclipboard.txt')
- print filename
- def getClipboardData():
- try:
- data = root.clipboard_get()
- return data
- except:
- return ''
- def setClipboardData(data):
- root.clipboard_append(data)
- 0
- print getClipboardData()
- setClipboardData('Thank You, Python!')
- print getClipboardData()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement