summaryrefslogtreecommitdiff
path: root/Lib/lib-tk/Tkinter.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-09 11:51:27 +0000
committerEric S. Raymond <esr@thyrsus.com>2001-02-09 11:51:27 +0000
commit9c034cef51db10928b553a8c062d81546572cae2 (patch)
tree4089df51c82e3c285a71ac82e31e754b1370013f /Lib/lib-tk/Tkinter.py
parent55026dd992109d6be86437a67010a7d7fcd92c7a (diff)
downloadcpython-9c034cef51db10928b553a8c062d81546572cae2.tar.gz
String method conversion.
Diffstat (limited to 'Lib/lib-tk/Tkinter.py')
-rw-r--r--Lib/lib-tk/Tkinter.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index c4e78a2a86..da436c1999 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -37,14 +37,13 @@ tkinter = _tkinter # b/w compat for export
TclError = _tkinter.TclError
from types import *
from Tkconstants import *
-import string; _string = string; del string
try:
import MacOS; _MacOS = MacOS; del MacOS
except ImportError:
_MacOS = None
-TkVersion = _string.atof(_tkinter.TK_VERSION)
-TclVersion = _string.atof(_tkinter.TCL_VERSION)
+TkVersion = float(_tkinter.TK_VERSION)
+TclVersion = float(_tkinter.TCL_VERSION)
READABLE = _tkinter.READABLE
WRITABLE = _tkinter.WRITABLE
@@ -782,7 +781,7 @@ class Misc:
return t[:1] + tuple(map(self.__winfo_getint, t[1:]))
def __winfo_getint(self, x):
"""Internal function."""
- return _string.atoi(x, 0)
+ return int(x, 0)
def winfo_vrootheight(self):
"""Return the height of the virtual root window associated with this
widget in pixels. If there is no virtual root window return the
@@ -850,7 +849,7 @@ class Misc:
%
(add and '+' or '',
funcid,
- _string.join(self._subst_format)))
+ " ".join(self._subst_format)))
self.tk.call(what + (sequence, cmd))
return funcid
elif sequence:
@@ -972,9 +971,8 @@ class Misc:
if name[0] == '.':
w = w._root()
name = name[1:]
- find = _string.find
while name:
- i = find(name, '.')
+ i = name.find('.')
if i >= 0:
name, tail = name[:i], name[i+1:]
else: