diff options
author | R David Murray <rdmurray@bitdance.com> | 2012-04-05 01:29:03 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2012-04-05 01:29:03 (GMT) |
commit | ce9806215b82e4a0e8dd37eb9a669477161adfec (patch) | |
tree | 02073b791a0f11927d7adb5e2ecf0305e0474b47 /Tools/scripts/parseentities.py | |
parent | a701388de1135241b5a8e4c970e06c0e83a66dc0 (diff) | |
parent | 54ac832a24a0f40ea3278707420b191be3619c99 (diff) | |
download | cpython-ce9806215b82e4a0e8dd37eb9a669477161adfec.zip cpython-ce9806215b82e4a0e8dd37eb9a669477161adfec.tar.gz cpython-ce9806215b82e4a0e8dd37eb9a669477161adfec.tar.bz2 |
Merge #14490, #14491: add 'sundry'-style import tests for Tools/scripts.
This patch changes a few of the scripts to have __name__=='__main__'
clauses so that they are importable without running. Also fixes the
syntax errors revealed by the tests.
Diffstat (limited to 'Tools/scripts/parseentities.py')
-rwxr-xr-x | Tools/scripts/parseentities.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Tools/scripts/parseentities.py b/Tools/scripts/parseentities.py index 5b0f1c6..a042d1c 100755 --- a/Tools/scripts/parseentities.py +++ b/Tools/scripts/parseentities.py @@ -13,7 +13,6 @@ """ import re,sys -import TextTools entityRE = re.compile('<!ENTITY +(\w+) +CDATA +"([^"]+)" +-- +((?:.|\n)+?) *-->') @@ -45,7 +44,7 @@ def writefile(f,defs): charcode = repr(charcode) else: charcode = repr(charcode) - comment = TextTools.collapse(comment) + comment = ' '.join(comment.split()) f.write(" '%s':\t%s, \t# %s\n" % (name,charcode,comment)) f.write('\n}\n') |