setting the clipboard

Dale Strickland-Clark dale at riverhall.NOTHANKS.co.uk
Mon Oct 29 15:50:26 CET 2001


"Peter Bismuti" <peterb at cortland.com> wrote:

>How can you set the clipboard from within Python?  I was told that it can be
>done.
>
>Thanks!
>

This puts the text in 'spam' on the clipboard:

import win32clipboard
win32clipboard.OpenClipboard(0)
win32clipboard.EmptyClipboard()
win32clipboard.SetClipboardText(spam)
win32clipboard.CloseClipboard()


--
Dale Strickland-Clark
Riverhall Systems Ltd



More information about the Python-list mailing list