Get tkinter text to the clipboard

Peter Otten __peter__ at web.de
Wed Mar 7 09:39:21 CET 2012


bugzilla-mail-box at yandex.ru wrote:

> How can I get something from tkinter gui to another program ?
> tkinter on python 3.2 on kde4

How about 

import tkinter
root = tkinter.Tk()

root.clipboard_clear()
root.clipboard_append("whatever")





More information about the Python-list mailing list