summaryrefslogtreecommitdiffstats
path: root/Tools/idle/SearchEngine.py
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2002-09-11 20:36:02 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2002-09-11 20:36:02 (GMT)
commitaaab30e00cc3e8d90c71b8657c284feeb4ac1413 (patch)
treed055e0bd374770014d9afdff1b961418b1828584 /Tools/idle/SearchEngine.py
parent6a0477b099560a452e37fe77c3850bf232487c16 (diff)
downloadcpython-aaab30e00cc3e8d90c71b8657c284feeb4ac1413.zip
cpython-aaab30e00cc3e8d90c71b8657c284feeb4ac1413.tar.gz
cpython-aaab30e00cc3e8d90c71b8657c284feeb4ac1413.tar.bz2
Apply diff2.txt from SF patch http://www.python.org/sf/572113
(with one small bugfix in bgen/bgen/scantools.py) This replaces string module functions with string methods for the stuff in the Tools directory. Several uses of string.letters etc. are still remaining.
Diffstat (limited to 'Tools/idle/SearchEngine.py')
-rw-r--r--Tools/idle/SearchEngine.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Tools/idle/SearchEngine.py b/Tools/idle/SearchEngine.py
index e379751..cc40a00 100644
--- a/Tools/idle/SearchEngine.py
+++ b/Tools/idle/SearchEngine.py
@@ -1,4 +1,3 @@
-import string
import re
from Tkinter import *
import tkMessageBox
@@ -175,7 +174,7 @@ class SearchEngine:
wrapped = 1
wrap = 0
pos = text.index("end-1c")
- line, col = map(int, string.split(pos, "."))
+ line, col = map(int, pos.split("."))
chars = text.get("%d.0" % line, "%d.0" % (line+1))
col = len(chars) - 1
return None
@@ -217,5 +216,5 @@ def get_selection(text):
# Helper to parse a text index into a (line, col) tuple.
def get_line_col(index):
- line, col = map(int, string.split(index, ".")) # Fails on invalid index
+ line, col = map(int, index.split(".")) # Fails on invalid index
return line, col