cheroot._compat module

Compatibility code for using Cheroot with various versions of Python.

cheroot._compat.assert_native(n)

Check whether the input is of nativ str type.

Raises:
TypeError: in case of failed check
cheroot._compat.bton(b, encoding='ISO-8859-1')

Return the byte string as native string in the given encoding.

cheroot._compat.ntob(n, encoding='ISO-8859-1')

Return the native string as bytes in the given encoding.

cheroot._compat.ntou(n, encoding='ISO-8859-1')

Return the native string as unicode with the given encoding.

Indices and tables