diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2006-07-27 22:49:54 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2006-07-27 22:49:54 (GMT) |
commit | fc0e61d9b6f3c77f915fc8b4de287b3f8697e167 (patch) | |
tree | 4bfe4a45f47b8dafed48842d56c9bdd351e23202 | |
parent | 752e28ad9fabd20907a55ae4a8846fdb4a977624 (diff) | |
download | cpython-fc0e61d9b6f3c77f915fc8b4de287b3f8697e167.zip cpython-fc0e61d9b6f3c77f915fc8b4de287b3f8697e167.tar.gz cpython-fc0e61d9b6f3c77f915fc8b4de287b3f8697e167.tar.bz2 |
Add example
-rw-r--r-- | Doc/lib/libbase64.tex | 12 |
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.} |