From fc0e61d9b6f3c77f915fc8b4de287b3f8697e167 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 27 Jul 2006 22:49:54 +0000 Subject: Add example --- Doc/lib/libbase64.tex | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Doc/lib/libbase64.tex b/Doc/lib/libbase64.tex index 747d837..0039c84 100644 --- a/Doc/lib/libbase64.tex +++ b/Doc/lib/libbase64.tex @@ -146,6 +146,18 @@ string containing one or more lines of base64-encoded data always including an extra trailing newline (\code{'\e n'}). \end{funcdesc} +An example usage of the module: + +\begin{verbatim} +>>> import base64 +>>> encoded = base64.b64encode('data to be encoded') +>>> encoded +'ZGF0YSB0byBiZSBlbmNvZGVk' +>>> data = base64.b64decode(encoded) +>>> data +'data to be encoded' +\end{verbatim} + \begin{seealso} \seemodule{binascii}{Support module containing \ASCII-to-binary and binary-to-\ASCII{} conversions.} -- cgit v0.12