sphinx.pycode.detect_encoding

sphinx.pycode.detect_encoding(readline)[source]

Like tokenize.detect_encoding() from Py3k, but a bit simplified.