DZone 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

Snippets has posted 5883 posts at DZone. View Full User Profile

Base64

05.30.2007
| 5431 views |
  • submit to reddit
        Simple python script to trnasform std input to base64 encoding

#! /usr/bin/python

import base64
import sys

encoded = base64.b64encode(sys.stdin.read())

print encoded