summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/lib/libbase64.tex12
1 files changed, 12 insertions, 0 deletions
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.}