summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk/tkFont.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-09 11:51:27 (GMT)
committerEric S. Raymond <esr@thyrsus.com>2001-02-09 11:51:27 (GMT)
commitfc170b1fd5db978f4e8d4c23c138a7b59df681ec (patch)
tree3c73ffcba8f5ece8c64a086a362b7fbe65368048 /Lib/lib-tk/tkFont.py
parentd8c628bd59f70b5389c39fd9e6a15cb3e2d46f27 (diff)
downloadcpython-fc170b1fd5db978f4e8d4c23c138a7b59df681ec.zip
cpython-fc170b1fd5db978f4e8d4c23c138a7b59df681ec.tar.gz
cpython-fc170b1fd5db978f4e8d4c23c138a7b59df681ec.tar.bz2
String method conversion.
Diffstat (limited to 'Lib/lib-tk/tkFont.py')
-rw-r--r--Lib/lib-tk/tkFont.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/lib-tk/tkFont.py b/Lib/lib-tk/tkFont.py
index a41e368..169c529 100644
--- a/Lib/lib-tk/tkFont.py
+++ b/Lib/lib-tk/tkFont.py
@@ -18,7 +18,6 @@
__version__ = "0.9"
import Tkinter
-import string
# weight/slant
NORMAL = "normal"
@@ -120,7 +119,7 @@ class Font:
def measure(self, text):
"Return text width"
- return string.atoi(self._call("font", "measure", self.name, text))
+ return int(self._call("font", "measure", self.name, text))
def metrics(self, *options):
"""Return font metrics.
@@ -129,14 +128,14 @@ class Font:
using this font before calling this method."""
if options:
- return string.atoi(
+ return int(
self._call("font", "metrics", self.name, self._get(options))
)
else:
res = self._split(self._call("font", "metrics", self.name))
options = {}
for i in range(0, len(res), 2):
- options[res[i][1:]] = string.atoi(res[i+1])
+ options[res[i][1:]] = int(res[i+1])
return options
def families(root=None):