[Python-checkins] CVS: python/dist/src/Tools/pynche StripViewer.py,2.14,2.15
Barry Warsaw
bwarsaw@users.sourceforge.net
Tue, 10 Jul 2001 14:44:26 -0700
Update of /cvsroot/python/python/dist/src/Tools/pynche
In directory usw-pr-cvs1:/tmp/cvs-serv30697
Modified Files:
StripViewer.py
Log Message:
De-string-module-ification.
Index: StripViewer.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/pynche/StripViewer.py,v
retrieving revision 2.14
retrieving revision 2.15
diff -C2 -r2.14 -r2.15
*** StripViewer.py 2001/04/18 03:51:55 2.14
--- StripViewer.py 2001/07/10 21:44:24 2.15
***************
*** 25,29 ****
"""
- import string
from Tkinter import *
import ColorDB
--- 25,28 ----
***************
*** 47,51 ****
--- 46,53 ----
BTNDRAG = 6
+ SPACE = ' '
+
+
def constant(numchips):
step = 255.0 / (numchips - 1)
***************
*** 142,146 ****
tags=self._TAG)
text = self._canvas.create_text(
! x - self._ARROWWIDTH + 15, # TBD: kludge
self._ARROWHEIGHT - self._TEXTYOFFSET,
justify=RIGHT,
--- 144,148 ----
tags=self._TAG)
text = self._canvas.create_text(
! x - self._ARROWWIDTH + 15, # BAW: kludge
self._ARROWHEIGHT - self._TEXTYOFFSET,
justify=RIGHT,
***************
*** 152,156 ****
coords = self._canvas.bbox(self._TAG)
assert coords
! return coords[2] - 6 # TBD: kludge
--- 154,158 ----
coords = self._canvas.bbox(self._TAG)
assert coords
! return coords[2] - 6 # BAW: kludge
***************
*** 183,187 ****
canvaswidth = numchips * (chipwidth + 1)
! canvasheight = chipheight + 43 # TBD: Kludge
# create the canvas and pack it
--- 185,189 ----
canvaswidth = numchips * (chipwidth + 1)
! canvasheight = chipheight + 43 # BAW: Kludge
# create the canvas and pack it
***************
*** 302,306 ****
i = i + 1
# call the raw tcl script
! colors = string.join(chips)
tk.eval('setcolor %s {%s}' % (self.__canvas._w, colors))
# move the arrows around
--- 304,308 ----
i = i + 1
# call the raw tcl script
! colors = SPACE.join(chips)
tk.eval('setcolor %s {%s}' % (self.__canvas._w, colors))
# move the arrows around