Utilities.
Builds a cross product of the given lists.
>>> cross(['A', 'B'], [1, 2, 3])
[['A', 1], ['A', 2], ['A', 3], ['B', 1], ['B', 2], ['B', 3]]
Creates a character for a Unicode codepoint similar to unichr.
For Python narrow builds this function does not raise a ValueError for characters outside the BMP but returns a string with a UTF-16 surrogate pair of two characters.
See also
Reads the configuration from the given section of the project’s config file.
| Parameters: | 
  | 
|---|---|
| Return type: | dict  | 
| Returns: | configuration settings for the given project  | 
Gets the path to packaged data.
| Return type: | str | 
|---|---|
| Returns: | path | 
Gets a list of search paths for the given project.
| Parameter: | projectName (str) – name of project | 
|---|---|
| Return type: | list | 
| Returns: | list of search paths | 
Checks if the given string is in titlecase.
| Parameter: | strng (str) – a string | 
|---|---|
| Return type: | bool | 
| Returns: | True if the given string is in titlecase according to L{titlecase()}. | 
Returns True if the given string is a single surrogate pair.
Always returns False for wide builds.
Locates a project file relative to the project’s directory. Returns None if module pkg_resources is not installed or package information is not available.
| Parameters: | 
  | 
|---|
Returns the string (without “word borders”) in titlecase.
This function is not designed to work for multi-entity strings in general but rather for syllables with apostrophes (e.g. 'Ch’ien1') and combining diacritics (e.g. 'Hm\u0300h'). It additionally needs to support cases where a multi-entity string can derive from a single entity as in the case for GR (e.g. 'Shern.me' for 'Sherm').
| Parameter: | strng (str) – a string | 
|---|---|
| Return type: | str | 
| Returns: | the given string in titlecase | 
Todo
Returns the Unicode codepoint for this character similar to ord.
This function can handle surrogate pairs as used by narrow builds.
| Raises ValueError: | |
|---|---|
| if the string is not a single char or not a valid surrogate pair | |
Bases: object
Iterates over a given set of codepoint ranges given in hex.
Bases: cjklib.util._CollationMixin, sqlalchemy.types.String
Construct a VARCHAR.
| Parameter: | collation – Optional, a column-level collation for this string value. | 
|---|
Bases: cjklib.util._CollationMixin, sqlalchemy.types.Text
Construct a TEXT.
| Parameter: | collation – Optional, a column-level collation for this string value. | 
|---|
Bases: optparse.Option
Extends optparse by adding:
Bases: dict, UserDict.DictMixin
Bases: object
Provides a CSV file iterator supporting Unicode.
Bases: csv.Dialect
Defines a default dialect for the case sniffing fails.