@@ -0,0 +1,349 @@
+%0A%0Adef as_string(string):%0A    %22%22%22%0A    Ensure that whatever type of string is incoming, it is returned as an%0A    actual string, versus 'bytes' which Python 3 likes to use.%0A    %22%22%22%0A    if isinstance(string, bytes):%0A        # we really ignore here if we can't properly decode with utf-8%0A        return string.decode('utf-8', 'ignore')%0A    return string%0A

add helper to convert to string