#!/usr/bin/env python
from setuptools import setup
setup(
  name = 'cs.lex',
  author = 'Cameron Simpson',
  author_email = 'cs@cskk.id.au',
  version = '20210306',
  url = 'https://bitbucket.org/cameron_simpson/css/commits/all',
  description =
    ('Lexical analysis functions, tokenisers, transcribers: an arbitrary '    
 'assortment of lexical and tokenisation functions useful for writing '    
 'recursive descent parsers, of which I have several. There are also some '    
 'transcription functions for producing text from various objects, such as '    
 '`hexify` and `unctrl`.'),
  long_description =
    ('Lexical analysis functions, tokenisers, transcribers:\n'    
 'an arbitrary assortment of lexical and tokenisation functions useful\n'    
 'for writing recursive descent parsers, of which I have several.\n'    
 'There are also some transcription functions for producing text\n'    
 'from various objects, such as `hexify` and `unctrl`.\n'    
 '\n'    
 '*Latest release 20210306*:\n'    
 '* New cropped() function to crop strings.\n'    
 '* Rework cropped_repr() to do the repr() itself, and to crop the interiors '    
 'of tuples and lists.\n'    
 '* cropped_repr: new inner_max_length for cropping the members of '    
 'collections.\n'    
 '* cropped_repr: special case for length=1 tuples.\n'    
 '* New typed_str(o) object returning type(o).__name__:str(o) in the default '    
 'case, useful for debugging.\n'    
 '\n'    
 'Generally the get_* functions accept a source string and an offset\n'    
 '(usually optional, default `0`) and return a token and the new offset,\n'    
 'raising `ValueError` on failed tokenisation.\n'    
 '\n'    
 '## Function `as_lines(chunks, partials=None)`\n'    
 '\n'    
 'Generator yielding complete lines from arbitrary pieces of text from\n'    
 'the iterable of `str` `chunks`.\n'    
 '\n'    
 'After completion, any remaining newline-free chunks remain\n'    
 'in the partials list; they will be unavailable to the caller\n'    
 'unless the list is presupplied.\n'    
 '\n'    
 '## Function `common_prefix(*strs)`\n'    
 '\n'    
 'Return the common prefix of the strings `strs`.\n'    
 '\n'    
 'Examples:\n'    
 '\n'    
 "    >>> common_prefix('abc', 'def')\n"    
 "    ''\n"    
 "    >>> common_prefix('abc', 'abd')\n"    
 "    'ab'\n"    
 "    >>> common_prefix('abc', 'abcdef')\n"    
 "    'abc'\n"    
 "    >>> common_prefix('abc', 'abcdef', 'abz')\n"    
 "    'ab'\n"    
 '    >>> # contrast with cs.fileutils.common_path_prefix\n'    
 "    >>> common_prefix('abc/def', 'abc/def1', 'abc/def2')\n"    
 "    'abc/def'\n"    
 '\n'    
 '## Function `common_suffix(*strs)`\n'    
 '\n'    
 'Return the common suffix of the strings `strs`.\n'    
 '\n'    
 '## Function `cropped(s: str, max_length: int = 32, roffset: int = 1, '    
 "ellipsis: str = '...')`\n"    
 '\n'    
 'If the length of `s` exceeds `max_length` (default `32`),\n'    
 'replace enough of the tail with `ellipsis`\n'    
 'and the last `roffset` (default `1`) characters of `s`\n'    
 'to fit in `max_length` characters.\n'    
 '\n'    
 '## Function `cropped_repr(o, roffset=1, max_length=32, '    
 'inner_max_length=None)`\n'    
 '\n'    
 'Compute a cropped `repr()` of `o`.\n'    
 '\n'    
 'Parameters:\n'    
 '* `o`: the object to represent\n'    
 '* `max_length`: the maximum length of the representation, default `32`\n'    
 '* `inner_max_length`: the maximum length of the representations\n'    
 '  of members of `o`, default `max_length//2`\n'    
 '* `roffset`: the number of trailing characters to preserve, default `1`\n'    
 '\n'    
 '## Function `cutprefix(s, prefix)`\n'    
 '\n'    
 'Strip a `prefix` from the front of `s`.\n'    
 'Return the suffix if `s.startswith(prefix)`, else `s`.\n'    
 '\n'    
 'Example:\n'    
 '\n'    
 "    >>> abc_def = 'abc.def'\n"    
 "    >>> cutprefix(abc_def, 'abc.')\n"    
 "    'def'\n"    
 "    >>> cutprefix(abc_def, 'zzz.')\n"    
 "    'abc.def'\n"    
 "    >>> cutprefix(abc_def, '.zzz') is abc_def\n"    
 '    True\n'    
 '\n'    
 '## Function `cutsuffix(s, suffix)`\n'    
 '\n'    
 'Strip a `suffix` from the end of `s`.\n'    
 'Return the prefix if `s.endswith(suffix)`, else `s`.\n'    
 '\n'    
 'Example:\n'    
 '\n'    
 "    >>> abc_def = 'abc.def'\n"    
 "    >>> cutsuffix(abc_def, '.def')\n"    
 "    'abc'\n"    
 "    >>> cutsuffix(abc_def, '.zzz')\n"    
 "    'abc.def'\n"    
 "    >>> cutsuffix(abc_def, '.zzz') is abc_def\n"    
 '    True\n'    
 '\n'    
 '## Function `format_as(format_s, format_mapping, error_sep=None)`\n'    
 '\n'    
 'Format the string `format_s` using `str.format_mapping`,\n'    
 'return the formatted result.\n'    
 'This is a wrapper for `str.format_map`\n'    
 'which raises a more informative `FormatAsError` exception on failure.\n'    
 '\n'    
 'Parameters:\n'    
 '* `format_s`: the format string to use as the template\n'    
 '* `format_mapping`: the mapping of available replacement fields\n'    
 '* `error_sep`: optional separator for the multipart error message,\n'    
 '  default from `FormatAsError.DEFAULT_SEPARATOR`:\n'    
 "  `'; '`\n"    
 '\n'    
 '## Function `format_escape(s)`\n'    
 '\n'    
 'Escape `{}` characters in a string to protect them from `str.format`.\n'    
 '\n'    
 '## Class `FormatableMixin`\n'    
 '\n'    
 'A mixin to supply a `format_as` method for classes with an\n'    
 'existing `format_kwargs` method.\n'    
 '\n'    
 'The `format_as` method is like an inside out `str.format` or\n'    
 '`object.__format__` method.\n'    
 'The `str.format` method is designed for formatting a string\n'    
 'from a variety of other objects supplied in the keyword arguments,\n'    
 'and the `object.__format__` method is for filling out a single `str.format`\n'    
 'replacement field from a single object.\n'    
 'By contrast, `format_as` is designed to fill out an entire format\n'    
 'string from the current object.\n'    
 '\n'    
 'For example, the `cs.tagset.TagSetMixin` class\n'    
 'uses `FormatableMixin` to provide a `format_as` method\n'    
 'whose replacement fields are derived from the tags in the tag set.\n'    
 '\n'    
 '### Method `FormatableMixin.format_as(self, format_s, error_sep=None, '    
 '**control_kw)`\n'    
 '\n'    
 'Return the string `format_s` formatted using the mapping\n'    
 'returned by `self.format_kwargs(**control_kw)`.\n'    
 '\n'    
 'The class using this mixin must provide\n'    
 'a `format_kwargs(**control_kw)` method\n'    
 'to compute the mapping provided to `str.format_map`.\n'    
 '\n'    
 '## Class '    
 '`FormatAsError(builtins.LookupError,builtins.Exception,builtins.BaseException)`\n'    
 '\n'    
 'Subclass of `LookupError` for use by `format_as`.\n'    
 '\n'    
 '## Function `get_chars(s, offset, gochars)`\n'    
 '\n'    
 'Scan the string `s` for characters in `gochars` starting at `offset`.\n'    
 'Return `(match,new_offset)`.\n'    
 '\n'    
 '`gochars` may also be a callable, in which case a character\n'    
 '`ch` is accepted if `gochars(ch)` is true.\n'    
 '\n'    
 '## Function `get_decimal(s, offset=0)`\n'    
 '\n'    
 'Scan the string `s` for decimal characters starting at `offset` (default '    
 '`0`).\n'    
 'Return `(dec_string,new_offset)`.\n'    
 '\n'    
 '## Function `get_decimal_or_float_value(s, offset=0)`\n'    
 '\n'    
 'Fetch a decimal or basic float (nnn.nnn) value\n'    
 'from the str `s` at `offset` (default `0`).\n'    
 'Return `(value,new_offset)`.\n'    
 '\n'    
 '## Function `get_decimal_value(s, offset=0)`\n'    
 '\n'    
 'Scan the string `s` for a decimal value starting at `offset` (default `0`).\n'    
 'Return `(value,new_offset)`.\n'    
 '\n'    
 '## Function `get_delimited(s, offset, delim)`\n'    
 '\n'    
 'Collect text from the string `s` from position `offset` up\n'    
 'to the first occurence of delimiter `delim`; return the text\n'    
 'excluding the delimiter and the offset after the delimiter.\n'    
 '\n'    
 '## Function `get_dotted_identifier(s, offset=0, **kw)`\n'    
 '\n'    
 'Scan the string `s` for a dotted identifier (by default an\n'    
 'ASCII letter or underscore followed by letters, digits or\n'    
 'underscores) with optional trailing dot and another dotted\n'    
 'identifier, starting at `offset` (default `0`).\n'    
 'Return `(match,new_offset)`.\n'    
 '\n'    
 'Note: the empty string and an unchanged offset will be returned if\n'    
 'there is no leading letter/underscore.\n'    
 '\n'    
 'Keyword arguments are passed to `get_identifier`\n'    
 '(used for each component of the dotted identifier).\n'    
 '\n'    
 '## Function `get_envvar(s, offset=0, environ=None, default=None, '    
 'specials=None)`\n'    
 '\n'    
 'Parse a simple environment variable reference to $varname or\n'    
 '$x where "x" is a special character.\n'    
 '\n'    
 'Parameters:\n'    
 '* `s`: the string with the variable reference\n'    
 '* `offset`: the starting point for the reference\n'    
 '* `default`: default value for missing environment variables;\n'    
 '   if `None` (the default) a `ValueError` is raised\n'    
 '* `environ`: the environment mapping, default `os.environ`\n'    
 '* `specials`: the mapping of special single character variables\n'    
 '\n'    
 '## Function `get_hexadecimal(s, offset=0)`\n'    
 '\n'    
 'Scan the string `s` for hexadecimal characters starting at `offset` (default '    
 '`0`).\n'    
 'Return `(hex_string,new_offset)`.\n'    
 '\n'    
 '## Function `get_hexadecimal_value(s, offset=0)`\n'    
 '\n'    
 'Scan the string `s` for a hexadecimal value starting at `offset` (default '    
 '`0`).\n'    
 'Return `(value,new_offset)`.\n'    
 '\n'    
 '## Function `get_identifier(s, offset=0, '    
 "alpha='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', "    
 "number='0123456789', extras='_')`\n"    
 '\n'    
 'Scan the string `s` for an identifier (by default an ASCII\n'    
 'letter or underscore followed by letters, digits or underscores)\n'    
 'starting at `offset` (default 0).\n'    
 'Return `(match,new_offset)`.\n'    
 '\n'    
 '*Note*: the empty string and an unchanged offset will be returned if\n'    
 'there is no leading letter/underscore.\n'    
 '\n'    
 'Parameters:\n'    
 '* `s`: the string to scan\n'    
 '* `offset`: the starting offset, default `0`.\n'    
 '* `alpha`: the characters considered alphabetic,\n'    
 '  default `string.ascii_letters`.\n'    
 '* `number`: the characters considered numeric,\n'    
 '  default `string.digits`.\n'    
 '* `extras`: extra characters considered part of an identifier,\n'    
 "  default `'_'`.\n"    
 '\n'    
 '## Function `get_ini_clause_entryname(s, offset=0)`\n'    
 '\n'    
 'Parse a `[`*clausename*`]`*entryname* string\n'    
 'from `s` at `offset` (default `0`).\n'    
 'Return `(clausename,entryname,new_offset)`.\n'    
 '\n'    
 '## Function `get_ini_clausename(s, offset=0)`\n'    
 '\n'    
 'Parse a `[`*clausename*`]` string from `s` at `offset` (default `0`).\n'    
 'Return `(clausename,new_offset)`.\n'    
 '\n'    
 '## Function `get_nonwhite(s, offset=0)`\n'    
 '\n'    
 'Scan the string `s` for characters not in `string.whitespace`\n'    
 'starting at `offset` (default `0`).\n'    
 'Return `(match,new_offset)`.\n'    
 '\n'    
 '## Function `get_other_chars(s, offset=0, stopchars=None)`\n'    
 '\n'    
 'Scan the string `s` for characters not in `stopchars` starting\n'    
 'at `offset` (default `0`).\n'    
 'Return `(match,new_offset)`.\n'    
 '\n'    
 '## Function `get_qstr(s, offset=0, q=\'"\', environ=None, default=None, '    
 'env_specials=None)`\n'    
 '\n'    
 'Get quoted text with slosh escapes and optional environment substitution.\n'    
 '\n'    
 'Parameters:\n'    
 '* `s`: the string containg the quoted text.\n'    
 '* `offset`: the starting point, default `0`.\n'    
 '* `q`: the quote character, default `\'"\'`. If `q` is `None`,\n'    
 '  do not expect the string to be delimited by quote marks.\n'    
 '* `environ`: if not `None`, also parse and expand `$`*envvar* references.\n'    
 '* `default`: passed to `get_envvar`\n'    
 '\n'    
 '## Function `get_qstr_or_identifier(s, offset)`\n'    
 '\n'    
 'Parse a double quoted string or an identifier.\n'    
 '\n'    
 "## Function `get_sloshed_text(s, delim, offset=0, slosh='\\\\', "    
 'mapper=<function slosh_mapper at 0x108d571f0>, specials=None)`\n'    
 '\n'    
 'Collect slosh escaped text from the string `s` from position\n'    
 '`offset` (default `0`) and return the decoded unicode string and\n'    
 'the offset of the completed parse.\n'    
 '\n'    
 'Parameters:\n'    
 '* `delim`: end of string delimiter, such as a single or double quote.\n'    
 '* `offset`: starting offset within `s`, default `0`.\n'    
 "* `slosh`: escape character, default a slosh ('\\').\n"    
 '* `mapper`: a mapping function which accepts a single character\n'    
 '  and returns a replacement string or `None`; this is used the\n'    
 "  replace things such as '\\t' or '\\n'. The default is the\n"    
 '  `slosh_mapper` function, whose default mapping is `SLOSH_CHARMAP`.\n'    
 '* `specials`: a mapping of other special character sequences and parse\n'    
 '  functions for gathering them up. When one of the special\n'    
 '  character sequences is found in the string, the parse\n'    
 '  function is called to parse at that point.\n'    
 '  The parse functions accept\n'    
 '  `s` and the offset of the special character. They return\n'    
 '  the decoded string and the offset past the parse.\n'    
 '\n'    
 'The escape character `slosh` introduces an encoding of some\n'    
 'replacement text whose value depends on the following character.\n'    
 'If the following character is:\n'    
 '* the escape character `slosh`, insert the escape character.\n'    
 '* the string delimiter `delim`, insert the delimiter.\n'    
 "* the character 'x', insert the character with code from the following\n"    
 '  2 hexadecimal digits.\n'    
 "* the character 'u', insert the character with code from the following\n"    
 '  4 hexadecimal digits.\n'    
 "* the character 'U', insert the character with code from the following\n"    
 '  8 hexadecimal digits.\n'    
 '* a character from the keys of `mapper`\n'    
 '\n'    
 '## Function `get_tokens(s, offset, getters)`\n'    
 '\n'    
 'Parse the string `s` from position `offset` using the supplied\n'    
 'tokeniser functions `getters`.\n'    
 'Return the list of tokens matched and the final offset.\n'    
 '\n'    
 'Parameters:\n'    
 '* `s`: the string to parse.\n'    
 '* `offset`: the starting position for the parse.\n'    
 '* `getters`: an iterable of tokeniser specifications.\n'    
 '\n'    
 'Each tokeniser specification `getter` is either:\n'    
 '* a callable expecting `(s,offset)` and returning `(token,new_offset)`\n'    
 '* a literal string, to be matched exactly\n'    
 '* a `tuple` or `list` with values `(func,args,kwargs)`;\n'    
 '  call `func(s,offset,*args,**kwargs)`\n'    
 '* an object with a `.match` method such as a regex;\n'    
 '  call `getter.match(s,offset)` and return a match object with\n'    
 '  a `.end()` method returning the offset of the end of the match\n'    
 '\n'    
 "## Function `get_uc_identifier(s, offset=0, number='0123456789', "    
 "extras='_')`\n"    
 '\n'    
 'Scan the string `s` for an identifier as for `get_identifier`,\n'    
 'but require the letters to be uppercase.\n'    
 '\n'    
 '## Function `get_white(s, offset=0)`\n'    
 '\n'    
 'Scan the string `s` for characters in `string.whitespace`\n'    
 'starting at `offset` (default `0`).\n'    
 'Return `(match,new_offset)`.\n'    
 '\n'    
 '## Function `hexify(bs)`\n'    
 '\n'    
 'A flavour of `binascii.hexlify` returning a `str`.\n'    
 '\n'    
 '## Function `htmlify(s, nbsp=False)`\n'    
 '\n'    
 'Convert a string for safe transcription in HTML.\n'    
 '\n'    
 'Parameters:\n'    
 '* `s`: the string\n'    
 '* `nbsp`: replaces spaces with `"&nbsp;"` to prevent word folding,\n'    
 '  default `False`.\n'    
 '\n'    
 '## Function `htmlquote(s)`\n'    
 '\n'    
 'Quote a string for use in HTML.\n'    
 '\n'    
 '## Function `is_dotted_identifier(s, offset=0, **kw)`\n'    
 '\n'    
 'Test if the string `s` is an identifier from position `offset` onward.\n'    
 '\n'    
 '## Function `is_identifier(s, offset=0, **kw)`\n'    
 '\n'    
 'Test if the string `s` is an identifier\n'    
 'from position `offset` (default `0`) onward.\n'    
 '\n'    
 '## Function `isUC_(s)`\n'    
 '\n'    
 'Check that a string matches the regular expression `^[A-Z][A-Z_0-9]*$`.\n'    
 '\n'    
 '## Function `jsquote(s)`\n'    
 '\n'    
 'Quote a string for use in JavaScript.\n'    
 '\n'    
 '## Function `lc_(value)`\n'    
 '\n'    
 'Return `value.lower()`\n'    
 "with `'-'` translated into `'_'` and `' '` translated into `'-'`.\n"    
 '\n'    
 'I use this to construct lowercase filenames containing a\n'    
 'readable transcription of a title string.\n'    
 '\n'    
 'See also `titleify_lc()`, an imperfect reversal of this.\n'    
 '\n'    
 '## Function `match_tokens(s, offset, getters)`\n'    
 '\n'    
 'Wrapper for `get_tokens` which catches `ValueError` exceptions\n'    
 'and returns `(None,offset)`.\n'    
 '\n'    
 '## Function `parseUC_sAttr(attr)`\n'    
 '\n'    
 'Take an attribute name `attr` and return `(key,is_plural)`.\n'    
 '\n'    
 'Examples:\n'    
 "* `'FOO'` returns `('FOO',False)`.\n"    
 "* `'FOOs'` or `'FOOes'` returns `('FOO',True)`.\n"    
 'Otherwise return `(None,False)`.\n'    
 '\n'    
 '## Function `phpquote(s)`\n'    
 '\n'    
 'Quote a string for use in PHP code.\n'    
 '\n'    
 '## Function `skipwhite(s, offset=0)`\n'    
 '\n'    
 'Convenience routine for skipping past whitespace;\n'    
 'returns the offset of the next nonwhitespace character.\n'    
 '\n'    
 '## Function `slosh_mapper(c, charmap=None)`\n'    
 '\n'    
 'Return a string to replace backslash-`c`, or `None`.\n'    
 '\n'    
 '## Function `stripped_dedent(s)`\n'    
 '\n'    
 "Slightly smarter dedent which ignores a string's opening indent.\n"    
 '\n'    
 'Algorithm:\n'    
 'strip the supplied string `s`, pull off the leading line,\n'    
 'dedent the rest, put back the leading line.\n'    
 '\n'    
 'This supports my preferred docstring layout, where the opening\n'    
 'line of text is on the same line as the opening quote.\n'    
 '\n'    
 'Example:\n'    
 '\n'    
 '    >>> def func(s):\n'    
 '    ...   """ Slightly smarter dedent which ignores a string\'s opening '    
 'indent.\n'    
 '    ...       Strip the supplied string `s`. Pull off the leading line.\n'    
 '    ...       Dedent the rest. Put back the leading line.\n'    
 '    ...   """\n'    
 '    ...   pass\n'    
 '    ...\n'    
 '    >>> from cs.lex import stripped_dedent\n'    
 '    >>> print(stripped_dedent(func.__doc__))\n'    
 "    Slightly smarter dedent which ignores a string's opening indent.\n"    
 '    Strip the supplied string `s`. Pull off the leading line.\n'    
 '    Dedent the rest. Put back the leading line.\n'    
 '\n'    
 "## Function `strlist(ary, sep=', ')`\n"    
 '\n'    
 "Convert an iterable to strings and join with `sep` (default `', '`).\n"    
 '\n'    
 '## Function `tabpadding(padlen, tabsize=8, offset=0)`\n'    
 '\n'    
 'Compute some spaces to use a tab padding at an offfset.\n'    
 '\n'    
 "## Function `texthexify(bs, shiftin='[', shiftout=']', whitelist=None)`\n"    
 '\n'    
 'Transcribe the bytes `bs` to text using compact text runs for\n'    
 'some common text values.\n'    
 '\n'    
 'This can be reversed with the `untexthexify` function.\n'    
 '\n'    
 'This is an ad doc format devised to be compact but also to\n'    
 'expose "text" embedded within to the eye. The original use\n'    
 'case was transcribing a binary directory entry format, where\n'    
 'the filename parts would be somewhat visible in the transcription.\n'    
 '\n'    
 'The output is a string of hexadecimal digits for the encoded\n'    
 'bytes except for runs of values from the whitelist, which are\n'    
 'enclosed in the shiftin and shiftout markers and transcribed\n'    
 'as is. The default whitelist is values of the ASCII letters,\n'    
 "the decimal digits and the punctuation characters '_-+.,'.\n"    
 "The default shiftin and shiftout markers are '[' and ']'.\n"    
 '\n'    
 'String objects converted with either `hexify` and `texthexify`\n'    
 'output strings may be freely concatenated and decoded with\n'    
 '`untexthexify`.\n'    
 '\n'    
 'Example:\n'    
 '\n'    
 "    >>> texthexify(b'&^%&^%abcdefghi)(*)(*')\n"    
 "    '265e25265e25[abcdefghi]29282a29282a'\n"    
 '\n'    
 'Parameters:\n'    
 '* `bs`: the bytes to transcribe\n'    
 '* `shiftin`: Optional. The marker string used to indicate a shift to\n'    
 "  direct textual transcription of the bytes, default: `'['`.\n"    
 '* `shiftout`: Optional. The marker string used to indicate a\n'    
 '  shift from text mode back into hexadecimal transcription,\n'    
 "  default `']'`.\n"    
 '* `whitelist`: an optional bytes or string object indicating byte\n'    
 '  values which may be represented directly in text;\n'    
 '  the default value is the ASCII letters, the decimal digits\n'    
 "  and the punctuation characters `'_-+.,'`.\n"    
 '\n'    
 '## Function `titleify_lc(value_lc)`\n'    
 '\n'    
 "Translate `'-'` into `' '` and `'_'` translated into `'-'`,\n"    
 'then titlecased.\n'    
 '\n'    
 'See also `lc_()`, which this reverses imperfectly.\n'    
 '\n'    
 '## Function `typed_str(o, use_cls=False, use_repr=False, max_length=None)`\n'    
 '\n'    
 'Return "type(o).__name__:str(o)" for some object `o`.\n'    
 '\n'    
 'Parameters:\n'    
 '* `use_cls`: default `False`;\n'    
 '  if true, use `str(type(o))` instead of `type(o).__name__`\n'    
 '* `use_repr`: default `False`;\n'    
 '  if true, use `repr(o)` instead of `str(o)`\n'    
 '\n'    
 'I use this a lot when debugging. Example:\n'    
 '\n'    
 '    from cs.lex import typed_str as s\n'    
 '    ......\n'    
 '    X("foo = %s", s(foo))\n'    
 '\n'    
 '## Function `unctrl(s, tabsize=8)`\n'    
 '\n'    
 'Return the string `s` with `TAB`s expanded and control characters\n'    
 'replaced with printable representations.\n'    
 '\n'    
 "## Function `untexthexify(s, shiftin='[', shiftout=']')`\n"    
 '\n'    
 'Decode a textual representation of binary data into binary data.\n'    
 '\n'    
 'This is the reverse of the `texthexify` function.\n'    
 '\n'    
 'Outside of the `shiftin`/`shiftout` markers the binary data\n'    
 'are represented as hexadecimal. Within the markers the bytes\n'    
 'have the values of the ordinals of the characters.\n'    
 '\n'    
 'Example:\n'    
 '\n'    
 "    >>> untexthexify('265e25265e25[abcdefghi]29282a29282a')\n"    
 "    b'&^%&^%abcdefghi)(*)(*'\n"    
 '\n'    
 'Parameters:\n'    
 '* `s`: the string containing the text representation.\n'    
 '* `shiftin`: Optional. The marker string commencing a sequence\n'    
 "  of direct text transcription, default `'['`.\n"    
 '* `shiftout`: Optional. The marker string ending a sequence\n'    
 "  of direct text transcription, default `']'`.\n"    
 '\n'    
 '# Release Log\n'    
 '\n'    
 '\n'    
 '\n'    
 '*Release 20210306*:\n'    
 '* New cropped() function to crop strings.\n'    
 '* Rework cropped_repr() to do the repr() itself, and to crop the interiors '    
 'of tuples and lists.\n'    
 '* cropped_repr: new inner_max_length for cropping the members of '    
 'collections.\n'    
 '* cropped_repr: special case for length=1 tuples.\n'    
 '* New typed_str(o) object returning type(o).__name__:str(o) in the default '    
 'case, useful for debugging.\n'    
 '\n'    
 '*Release 20201228*:\n'    
 'Minor doc updates.\n'    
 '\n'    
 '*Release 20200914*:\n'    
 '* Hide terribly special purpose lastlinelen() in cs.hier under a private '    
 'name.\n'    
 '* New common_prefix and common_suffix function to compare strings.\n'    
 '\n'    
 '*Release 20200718*:\n'    
 'get_chars: accept a callable for gochars, indicating a per character test '    
 'function.\n'    
 '\n'    
 '*Release 20200613*:\n'    
 'cropped_repr: replace hardwired 29 with computed length\n'    
 '\n'    
 '*Release 20200517*:\n'    
 '* New get_ini_clausename to parse "[clausename]".\n'    
 '* New get_ini_clause_entryname parsing "[clausename]entryname".\n'    
 '* New cropped_repr for returning a shortened repr()+"..." if the length '    
 'exceeds a threshold.\n'    
 '* New format_escape function to double {} characters to survive str.format.\n'    
 '\n'    
 '*Release 20200318*:\n'    
 '* New lc_() function to lowercase and dash a string, new titleify_lc() to '    
 'mostly reverse lc_().\n'    
 '* New format_as function, FormatableMixin and related FormatAsError.\n'    
 '\n'    
 '*Release 20200229*:\n'    
 'New cutprefix and cutsuffix functions.\n'    
 '\n'    
 '*Release 20190812*:\n'    
 'Fix bad slosh escapes in strings.\n'    
 '\n'    
 '*Release 20190220*:\n'    
 'New function get_qstr_or_identifier.\n'    
 '\n'    
 '*Release 20181108*:\n'    
 'new function get_decimal_or_float_value to read a decimal or basic float\n'    
 '\n'    
 '*Release 20180815*:\n'    
 'No semantic changes; update some docstrings and clean some lint, fix a unit '    
 'test.\n'    
 '\n'    
 '*Release 20180810*:\n'    
 '* New get_decimal_value and get_hexadecimal_value functions.\n'    
 '* New stripped_dedent function, a slightly smarter textwrap.dedent.\n'    
 '\n'    
 '*Release 20171231*:\n'    
 'New function get_decimal. Drop unused function dict2js.\n'    
 '\n'    
 '*Release 20170904*:\n'    
 'Python 2/3 ports, move rfc2047 into new cs.rfc2047 module.\n'    
 '\n'    
 '*Release 20160828*:\n'    
 '* Use "install_requires" instead of "requires" in DISTINFO.\n'    
 '* Discard str1(), pointless optimisation.\n'    
 '* unrfc2047: map _ to SPACE, improve exception handling.\n'    
 '* Add phpquote: quote a string for use in PHP code; add docstring to '    
 'jsquote.\n'    
 '* Add is_identifier test.\n'    
 '* Add get_dotted_identifier.\n'    
 '* Add is_dotted_identifier.\n'    
 '* Add get_hexadecimal.\n'    
 '* Add skipwhite, convenince wrapper for get_white returning just the next '    
 'offset.\n'    
 '* Assorted bugfixes and improvements.\n'    
 '\n'    
 '*Release 20150120*:\n'    
 'cs.lex: texthexify: backport to python 2 using cs.py3 bytes type\n'    
 '\n'    
 '*Release 20150118*:\n'    
 'metadata updates\n'    
 '\n'    
 '*Release 20150116*:\n'    
 'PyPI metadata and slight code cleanup.'),
  classifiers = ['Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 3', 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Topic :: Software Development :: Libraries :: Python Modules', 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)'],
  install_requires = ['cs.deco', 'cs.py3', 'cs.seq>=20200914'],
  keywords = ['python2', 'python3'],
  license = 'GNU General Public License v3 or later (GPLv3+)',
  long_description_content_type = 'text/markdown',
  package_dir = {'': 'lib/python'},
  py_modules = ['cs.lex'],
)
