diff options
author | Barry Warsaw <barry@python.org> | 2001-07-10 21:44:24 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2001-07-10 21:44:24 (GMT) |
commit | 8e4fa072f7e33f49c000d8edff172920bfd0f5ff (patch) | |
tree | 4d163401d660a10b28c78d92e052da33aa27e142 /Tools/pynche/StripViewer.py | |
parent | 60e1886e872f25fe3518e0ff48bbe50f59c3be4c (diff) | |
download | cpython-8e4fa072f7e33f49c000d8edff172920bfd0f5ff.zip cpython-8e4fa072f7e33f49c000d8edff172920bfd0f5ff.tar.gz cpython-8e4fa072f7e33f49c000d8edff172920bfd0f5ff.tar.bz2 |
De-string-module-ification.
Diffstat (limited to 'Tools/pynche/StripViewer.py')
-rw-r--r-- | Tools/pynche/StripViewer.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Tools/pynche/StripViewer.py b/Tools/pynche/StripViewer.py index 8205a9a..b190482 100644 --- a/Tools/pynche/StripViewer.py +++ b/Tools/pynche/StripViewer.py @@ -24,7 +24,6 @@ select the color under the cursor while you drag it, but be forewarned that this can be slow. """ -import string from Tkinter import * import ColorDB @@ -46,7 +45,10 @@ BTNDOWN = 4 BTNUP = 5 BTNDRAG = 6 +SPACE = ' ' + + def constant(numchips): step = 255.0 / (numchips - 1) start = 0.0 @@ -141,7 +143,7 @@ class RightArrow(LeftArrow): width=3.0, tags=self._TAG) text = self._canvas.create_text( - x - self._ARROWWIDTH + 15, # TBD: kludge + x - self._ARROWWIDTH + 15, # BAW: kludge self._ARROWHEIGHT - self._TEXTYOFFSET, justify=RIGHT, text='128', @@ -151,7 +153,7 @@ class RightArrow(LeftArrow): def _x(self): coords = self._canvas.bbox(self._TAG) assert coords - return coords[2] - 6 # TBD: kludge + return coords[2] - 6 # BAW: kludge @@ -182,7 +184,7 @@ class StripWidget: self.__sb = switchboard canvaswidth = numchips * (chipwidth + 1) - canvasheight = chipheight + 43 # TBD: Kludge + canvasheight = chipheight + 43 # BAW: Kludge # create the canvas and pack it canvas = self.__canvas = Canvas(master, @@ -301,7 +303,7 @@ class StripWidget: chip = i i = i + 1 # call the raw tcl script - colors = string.join(chips) + colors = SPACE.join(chips) tk.eval('setcolor %s {%s}' % (self.__canvas._w, colors)) # move the arrows around self.__trackarrow(chip, (red, green, blue)) |