from itertools import chain
from itertools import izip_longest
def chunks(n, iterable, padvalue=None):
return izip_longest(*[iter(iterable)]*n, fillvalue=padvalue)
def uuencode(text):
b = "".join([bin(ord(c))[2:].rjust(8, '0') for c in text.encode('utf-8')])
print(b)
return(u"".join([chr(int("".join(c), 2)+32) for c in chunks(6, b, "000000")]))
Comments