mirror of
https://github.com/python/cpython.git
synced 2025-08-24 10:45:53 +00:00
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.
This commit is contained in:
parent
b6046301ef
commit
54ac832a24
7 changed files with 128 additions and 82 deletions
|
@ -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')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue