thorn.utils.compat

Python version compatibility utilities.

thorn.utils.compat.bytes_if_py2(s)[source]

Convert str to bytes.