I'm trying to find a pythonic way to do this PHP code:
chunk_split(base64_encode($picture));
http://us2.php.net/chunk_split
chunk_split split the string into smaller chunks of 76 character long by adding a "\r\n" (RFC 2045).
thank you
I'm trying to find a pythonic way to do this PHP code:
chunk_split(base64_encode($picture));
http://us2.php.net/chunk_split
chunk_split split the string into smaller chunks of 76 character long by adding a "\r\n" (RFC 2045).
thank you
chunk_split = lambda s: '\r\n'.join(s[i:min(i+76, len(s))] for i in xrange(0, len(s), 76))