[Python-checkins] r50880 - python/trunk/Doc/lib/libbase64.tex

andrew.kuchling python-checkins at python.org
Fri Jul 28 00:49:56 CEST 2006


Author: andrew.kuchling
Date: Fri Jul 28 00:49:54 2006
New Revision: 50880

Modified:
   python/trunk/Doc/lib/libbase64.tex
Log:
Add example

Modified: python/trunk/Doc/lib/libbase64.tex
==============================================================================
--- python/trunk/Doc/lib/libbase64.tex	(original)
+++ python/trunk/Doc/lib/libbase64.tex	Fri Jul 28 00:49:54 2006
@@ -146,6 +146,18 @@
 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.}


More information about the Python-checkins mailing list