annotate MoinMoin/util/chartypes_create.py @ 4468:fad2936d33a7 1.8.1

added dummy mig script for 1.8.1, bumped version number
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 24 Dec 2008 16:32:46 +0100
parents 01f05e74aa9c
children
rev   line source
506
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
1 """
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
2 Build MoinMoin/util/chartypes.py with
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
3 UCS-2 character types (upper/lower/digits/spaces).
2286
01f05e74aa9c Big PEP8 and whitespace cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1918
diff changeset
4
1918
bb2e053067fb fixing copyright headers: remove umlauts (encoding troubles), make epydoc compatible, reformat
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1795
diff changeset
5 @copyright: 2004 MoinMoin:ThomasWaldmann
506
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
6 @license: GNU GPL, see COPYING for details
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
7 """
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
8
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
9 uppercase = []
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
10 lowercase = []
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
11 digits = []
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
12 space = []
1004
7828d27399d4 whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 506
diff changeset
13 for code in range(1, 65535):
506
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
14 c = unichr(code)
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
15 str = "\\u%04x" % code
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
16 if c.isupper():
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
17 uppercase.append(str)
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
18 elif c.islower():
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
19 lowercase.append(str)
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
20 elif c.isdigit():
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
21 digits.append(str)
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
22 elif c.isspace():
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
23 space.append(str)
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
24
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
25 chars_upper = u''.join(uppercase)
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
26 chars_lower = u''.join(lowercase+digits)
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
27 chars_digits = u''.join(digits)
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
28 chars_spaces = u''.join(space)
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
29
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
30 print """
1795
94887c1c1e8f direct import from chartypes, reorder config.py
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1004
diff changeset
31 chars_upper = u"%(chars_upper)s"
94887c1c1e8f direct import from chartypes, reorder config.py
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1004
diff changeset
32
94887c1c1e8f direct import from chartypes, reorder config.py
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1004
diff changeset
33 chars_lower = u"%(chars_lower)s"
94887c1c1e8f direct import from chartypes, reorder config.py
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1004
diff changeset
34
94887c1c1e8f direct import from chartypes, reorder config.py
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1004
diff changeset
35 chars_digits = u"%(chars_digits)s"
94887c1c1e8f direct import from chartypes, reorder config.py
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1004
diff changeset
36
94887c1c1e8f direct import from chartypes, reorder config.py
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1004
diff changeset
37 chars_spaces = u"%(chars_spaces)s"
94887c1c1e8f direct import from chartypes, reorder config.py
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1004
diff changeset
38
506
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
39
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
40 """ % globals()
24463c96f276 move chartypes.py creation script besides the result
Thomas Waldmann <tw@waldmann-edv.de>
parents:
diff changeset
41