299bc82a05dc9902e5a13a106fba3f733aa2f5d2
[python-collate.git] / README.txt
1 This module is unsuitable for real-world use at this time.
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40 pycollate - Collation algorithms for Python
41 -------------------------------------------
42
43 pycollate is an interface to various collation algorithms for Python.
44
45 Supported backends:
46 - icu - Based on the IBM ICU toolkit and Jim Fulton's zope.ucol.
47 - uca - Native Python UCA implementation, based on James Tauber's.
48 - syslocale - Native OS collation routines.
49
50 The different backends have varying features and behaviors; which one
51 is best depends on your goals. A specific backend can be used, or the
52 default one (usually ICU or UCA) can also be used.
53
54 pycollate also provides tools to perform word-wise and numeric sorts.
55
56 pycollate, as with all Unicode collation tools, is a work in progress.
57
58 Example
59 -------
60 import collate
61 strings = file("contents.txt").read().decode("utf-8").splitlines()
62 strings.sort(key=collate.key)
63 # Equivalently but slower,
64 strings.sort(cmp=collate.cmp)
65
66 License
67 -------
68
69 uca/__init__.py:
70
71 Copyright (c) 2006 James Tauber
72
73 Permission is hereby granted, free of charge, to any person obtaining a copy
74 of this software and associated documentation files (the "Software"), to deal
75 in the Software without restriction, including without limitation the rights
76 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
77 copies of the Software, and to permit persons to whom the Software is
78 furnished to do so, subject to the following conditions:
79
80 The above copyright notice and this permission notice shall be included in
81 all copies or substantial portions of the Software.
82
83 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
84 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
85 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
86 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
87 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
88 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
89 THE SOFTWARE.
90
91
92 All else:
93
94 Copyright 2010 Joe Wreschnig
95
96 Permission is hereby granted, free of charge, to any person obtaining a copy
97 of this software and associated documentation files (the "Software"), to deal
98 in the Software without restriction, including without limitation the rights
99 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
100 copies of the Software, and to permit persons to whom the Software is
101 furnished to do so, subject to the following conditions:
102
103 The above copyright notice and this permission notice shall be included in
104 all copies or substantial portions of the Software.
105
106 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
107 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
108 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
109 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
110 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
111 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
112 THE SOFTWARE.