diff options
author | Walter Dörwald <walter@livinglogic.de> | 2002-09-11 20:36:02 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2002-09-11 20:36:02 (GMT) |
commit | aaab30e00cc3e8d90c71b8657c284feeb4ac1413 (patch) | |
tree | d055e0bd374770014d9afdff1b961418b1828584 /Tools/webchecker/tktools.py | |
parent | 6a0477b099560a452e37fe77c3850bf232487c16 (diff) | |
download | cpython-aaab30e00cc3e8d90c71b8657c284feeb4ac1413.zip cpython-aaab30e00cc3e8d90c71b8657c284feeb4ac1413.tar.gz cpython-aaab30e00cc3e8d90c71b8657c284feeb4ac1413.tar.bz2 |
Apply diff2.txt from SF patch http://www.python.org/sf/572113
(with one small bugfix in bgen/bgen/scantools.py)
This replaces string module functions with string methods
for the stuff in the Tools directory. Several uses of
string.letters etc. are still remaining.
Diffstat (limited to 'Tools/webchecker/tktools.py')
-rw-r--r-- | Tools/webchecker/tktools.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Tools/webchecker/tktools.py b/Tools/webchecker/tktools.py index 0db4d49..3a68f9a 100644 --- a/Tools/webchecker/tktools.py +++ b/Tools/webchecker/tktools.py @@ -1,7 +1,6 @@ """Assorted Tk-related subroutines used in Grail.""" -import string from types import * from Tkinter import * @@ -335,7 +334,7 @@ def flatten(msg): """Turn a list or tuple into a single string -- recursively.""" t = type(msg) if t in (ListType, TupleType): - msg = string.join(map(flatten, msg)) + msg = ' '.join(map(flatten, msg)) elif t is ClassType: msg = msg.__name__ else: @@ -345,7 +344,7 @@ def flatten(msg): def boolean(s): """Test whether a string is a Tk boolean, without error checking.""" - if string.lower(s) in ('', '0', 'no', 'off', 'false'): return 0 + if s.lower() in ('', '0', 'no', 'off', 'false'): return 0 else: return 1 |