base64
#! /usr/bin/python import base64 import sys encoded = base64.b64encode(sys.stdin.read()) print encoded
11381 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
#! /usr/bin/python import base64 import sys encoded = base64.b64encode(sys.stdin.read()) print encoded
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789+/
>>> import base64 >>> base64.encodestring('hello world') 'aGVsbG8gd29ybGQ=\n' >>> base64.decodestring(_) 'hello world' >>>