Code: Alles auswählen
def copy(event):
tk.master.clipboard_clear()
tk.master.clipboard_append(tk.text.selection_get())
def paste(event):
if len(tk.text.tag_ranges(SEL)) != 0:
tk.text.delete(SEL_FIRST, SEL_LAST)
tk.text.insert(INSERT, tk.master.clipboard_get())
def cut(event):
tk.master.clipboard_clear()
tk.master.clipboard_append(tk.text.selection_get())
if len(tk.text.tag_ranges(SEL)) != 0:
tk.text.delete(SEL_FIRST, SEL_LAST)