# don't run from shell import sys import base64 for line in sys.stdin: print base64.urlsafe_b64encode(line)