[go: up one dir, main page]

Menu

[r22]: / note / tags / commands.py  Maximize  Restore  History

Download this file

35 lines (27 with data), 545 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/python
from Tkinter import *
import sys
import os
def cut_text(self):
try:
self.clipboard_clear()
self.clipboard_append(self.get("sel.first","sel.last"))
self.delete("sel.first","sel.last")
except:
pass
def copy_text(self):
try:
self.clipboard_clear()
self.clipboard_append(self.get("sel.first","sel.last"))
except:
pass
def paste_text(self):
try:
self.insert("insert",self.selection_get(selection="CLIPBOARD"))
except:
pass
def select_all(self):
try:
self.tag_add("sel","1.0","end")
except:
pass