def unescapeWithRe(text): """ Unescape things like \n or \f. Throws exception if unescaping fails """ return _re.sub(u"", text, u"", 1)
def unescapeForIni(text): """ Inverse of escapeForIni() """ return _re.sub(ur"\\x([0-9a-f]{2})", _unescapeForIniHelper, text)