[Python-checkins] CVS: python/dist/src/Lib/lib-tk tkFont.py,1.2,1.3

Eric S. Raymond esr@users.sourceforge.net
Fri, 09 Feb 2001 03:18:00 -0800


Update of /cvsroot/python/python/dist/src/Lib/lib-tk
In directory usw-pr-cvs1:/tmp/cvs-serv14380

Modified Files:
	tkFont.py 
Log Message:
String method conversion.


Index: tkFont.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/tkFont.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** tkFont.py	2000/10/23 18:31:14	1.2
--- tkFont.py	2001/02/09 11:17:58	1.3
***************
*** 19,23 ****
  
  import Tkinter
- import string
  
  # weight/slant
--- 19,22 ----
***************
*** 121,125 ****
      def measure(self, text):
          "Return text width"
!         return string.atoi(self._call("font", "measure", self.name, text))
  
      def metrics(self, *options):
--- 120,124 ----
      def measure(self, text):
          "Return text width"
!         return int(self._call("font", "measure", self.name, text))
  
      def metrics(self, *options):
***************
*** 130,134 ****
  
          if options:
!             return string.atoi(
                  self._call("font", "metrics", self.name, self._get(options))
                  )
--- 129,133 ----
  
          if options:
!             return int(
                  self._call("font", "metrics", self.name, self._get(options))
                  )
***************
*** 137,141 ****
              options = {}
              for i in range(0, len(res), 2):
!                 options[res[i][1:]] = string.atoi(res[i+1])
              return options
  
--- 136,140 ----
              options = {}
              for i in range(0, len(res), 2):
!                 options[res[i][1:]] = int(res[i+1])
              return options