pycollate: Options to set backend, locale, and encoding.
[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 icu/_ucol.pyx:
92
93 Copyright (c) 2004 Zope Corporation and Contributors.
94 All Rights Reserved.
95
96 This software is subject to the provisions of the Zope Public License,
97 Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
98 THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
99 WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
100 WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
101 FOR A PARTICULAR PURPOSE.
102
103 All else:
104
105 Copyright 2010 Joe Wreschnig
106
107 Permission is hereby granted, free of charge, to any person obtaining a copy
108 of this software and associated documentation files (the "Software"), to deal
109 in the Software without restriction, including without limitation the rights
110 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
111 copies of the Software, and to permit persons to whom the Software is
112 furnished to do so, subject to the following conditions:
113
114 The above copyright notice and this permission notice shall be included in
115 all copies or substantial portions of the Software.
116
117 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
118 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
119 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
120 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
121 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
122 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
123 THE SOFTWARE.