{ "info": { "author": "Jim Fulton", "author_email": "jim@zope.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Zope Public License", "Topic :: Software Development :: Internationalization", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "*************************************\nLocale-based text collation using ICU\n*************************************\n\nThis package provides a Python interface to the `International\nComponent for Unicode (ICU)\n`_.\n\n.. contents::\n\nChange History\n**************\n\n1.0.2 (2006-10-16)\n==================\n\nFixed setup file problems.\n\n1.0.1 (2006-10-16)\n==================\n\nAdded missing import to setup.py.\n\n1.0 (2006-10-16)\n================\n\nInitial version.\n\nInstallation\n************\n\nzope.ucol is installed via setup.py in the usual way.\n\nYou must have ICU installed. If ICU isn't installed in the usual\nplaces for include files and libraries on your system, you can provide\ncommand-line options to setup.py when building the extensions, as in::\n\n python2.4 setup.py build_ext \\\n -I/home/jim/p/z4i/jim-icu/var/opt/icu/include \\\n -L/home/jim/p/z4i/jim-icu/var/opt/icu/lib \\\n -R/home/jim/p/z4i/jim-icu/var/opt/icu/lib\n\n python2.4 setup.py install\n\nNote that if the libraries are in an unusual place, you will want to\nspecify their location using the -R option so you don't have to\nspecify it at run-time.\n\nDetailed Documentation\n**********************\n\nLocale-based text collation using ICU\n=====================================\n\nThe zope.ucol package provides a minimal Pythonic wrapper around the\nu_col C API of the International Components for Unicode (ICU) library.\nIt provides locale-based text collation.\n\nTo perform collation, you need to create a collator key factory for\nyour locale. We'll use the special \"root\" locale in this example:\n\n >>> import zope.ucol\n >>> collator = zope.ucol.Collator(\"root\")\n\nThe collator has a key method for creating collation keys from unicode\nstrings. The method can be passed as the key argument to list.sort\nor to the built-in sorted function.\n\n >>> sorted([u'Sam', u'sally', u'Abe', u'alice', u'Terry', u'tim',\n ... u'\\U00023119', u'\\u62d5'], key=collator.key)\n [u'Abe', u'alice', u'sally', u'Sam', u'Terry', u'tim', \n u'\\u62d5', u'\\U00023119']\n\nThere is a cmp method for comparing 2 unicode strings, which can also be\nused when sorting:\n\n >>> sorted([u'Sam', u'sally', u'Abe', u'alice', u'Terry', u'tim',\n ... u'\\U00023119', u'\\u62d5'], collator.cmp)\n [u'Abe', u'alice', u'sally', u'Sam', u'Terry', u'tim', \n u'\\u62d5', u'\\U00023119']\n\nNote that it is almost always more efficient to pass the key method to\nsorting functions, rather than the cmp method. The cmp method is more\nefficient in the special case that strings are long and few and when\nthey tend to differ at their beginnings. This is because computing\nthe entire key can be much more expensive than comparison when the\norder can be determined based on analyzing a small portion of the\noriginal strings.\n\nCollator attributes\n-------------------\n\nYou can ask a collator for it's locale:\n\n >>> collator.locale\n 'root'\n\nand you can find out whether default collation information was used:\n\n >>> collator.used_default_information\n 0\n >>> collator = zope.ucol.Collator(\"eek\")\n >>> collator.used_default_information\n 1\n\nDownload\n**********************", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.python.org/pypi/zope.ucol", "keywords": "internationalization", "license": "ZPL 2.1", "maintainer": null, "maintainer_email": null, "name": "zope.ucol", "package_url": "https://pypi.org/project/zope.ucol/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/zope.ucol/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.python.org/pypi/zope.ucol" }, "release_url": "https://pypi.org/project/zope.ucol/1.0.2/", "requires_dist": null, "requires_python": null, "summary": "Python access to ICU text collation", "version": "1.0.2" }, "last_serial": 802397, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "8caae759a259455fe244ef9cd9305aee", "sha256": "4740f2da522401e64552f2a8a81a6a92828fdc86aa6cc23524af3edbd689066f" }, "downloads": -1, "filename": "zope.ucol-1.0.tar.gz", "has_sig": false, "md5_digest": "8caae759a259455fe244ef9cd9305aee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13032, "upload_time": "2006-10-16T10:56:24", "url": "https://files.pythonhosted.org/packages/3d/b3/b10c46f7c3c36381ac19640591f3c6712dd0f4f7aa5e39072d546e358cc8/zope.ucol-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "f4bd079084139b1f35d7b19a3a5c855a", "sha256": "f618783ff6a356aa44591ac1833542d9dd4c37d53954d7267bb5374ba235917b" }, "downloads": -1, "filename": "zope.ucol-1.0.1.tar.gz", "has_sig": false, "md5_digest": "f4bd079084139b1f35d7b19a3a5c855a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15088, "upload_time": "2006-10-16T22:15:17", "url": "https://files.pythonhosted.org/packages/fe/d6/adac1791d1895752e60557b78f910d67a1aaf649e713fcdd7fde988898ef/zope.ucol-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "557c38e3ed2751933c1d554d60a5cb1a", "sha256": "1739bba505ba098d080ba170c274791105033eb8b02a6ce9794165c68691523b" }, "downloads": -1, "filename": "zope.ucol-1.0.2.tar.gz", "has_sig": false, "md5_digest": "557c38e3ed2751933c1d554d60a5cb1a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15138, "upload_time": "2006-10-16T22:26:58", "url": "https://files.pythonhosted.org/packages/e5/bc/2640d1c930cf0dd63b8dbf3439459cb5e9873c8973882f6b34675404d241/zope.ucol-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "557c38e3ed2751933c1d554d60a5cb1a", "sha256": "1739bba505ba098d080ba170c274791105033eb8b02a6ce9794165c68691523b" }, "downloads": -1, "filename": "zope.ucol-1.0.2.tar.gz", "has_sig": false, "md5_digest": "557c38e3ed2751933c1d554d60a5cb1a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15138, "upload_time": "2006-10-16T22:26:58", "url": "https://files.pythonhosted.org/packages/e5/bc/2640d1c930cf0dd63b8dbf3439459cb5e9873c8973882f6b34675404d241/zope.ucol-1.0.2.tar.gz" } ] }