Post date: Mar 18, 2011 2:07:27 PM
Here's how to use it.
>>>
import
base64>>>
base64.encodestring('hello world')'aGVsbG8gd29ybGQ=\n'>>>
base64.decodestring(_)'hello world'>>>
If the text is long, the base64 module will split the encoded data into multiple lines
. And thus we need to replace '\n' in results.