J
John Benson
With respect to:
Message: 13
Date: Thu, 1 Jan 2004 18:38:47 -0800 (PST)
From: black <[email protected]>
Subject: undo and redo ?
To: (e-mail address removed)
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"
I'm coding with Tkinter and i wonder whether we could get current OS'
clipboard available, and event more, anyone can inspires me how we can
achieve undo and redo function ?
(end quote)
I don't know about undo/redo, but I have sent stuff out of Python via the
clipboard. What works for me (courtesy of Mark Hammond) is:
import win32clipboard, win32con
win32clipboard.OpenClipboard()
win32clipboard.EmptyClipboard()
win32clipboard.SetClipboardText('your string here')
win32clipboard.CloseClipboard()
I found out that if I didn't empty the clipboard before adding to it, the
new data sometimes ended up in the Microsoft Office clipboard, sometimes
not. Now it just shows up each and every time in the plain old Windows
clipboard.
Message: 13
Date: Thu, 1 Jan 2004 18:38:47 -0800 (PST)
From: black <[email protected]>
Subject: undo and redo ?
To: (e-mail address removed)
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"
I'm coding with Tkinter and i wonder whether we could get current OS'
clipboard available, and event more, anyone can inspires me how we can
achieve undo and redo function ?
(end quote)
I don't know about undo/redo, but I have sent stuff out of Python via the
clipboard. What works for me (courtesy of Mark Hammond) is:
import win32clipboard, win32con
win32clipboard.OpenClipboard()
win32clipboard.EmptyClipboard()
win32clipboard.SetClipboardText('your string here')
win32clipboard.CloseClipboard()
I found out that if I didn't empty the clipboard before adding to it, the
new data sometimes ended up in the Microsoft Office clipboard, sometimes
not. Now it just shows up each and every time in the plain old Windows
clipboard.