summaryrefslogtreecommitdiffstats
path: root/Doc/lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-04-27 21:25:52 (GMT)
committerGuido van Rossum <guido@python.org>1997-04-27 21:25:52 (GMT)
commite76b7a8fcd769c4204a7f0e0438dce482fa32015 (patch)
tree2a9c31b1cbe429d5b5a09b37f03d210b07678cb0 /Doc/lib
parent8be9a116175fbc5cea9d93e5e998af0df4cee23b (diff)
downloadcpython-e76b7a8fcd769c4204a7f0e0438dce482fa32015.zip
cpython-e76b7a8fcd769c4204a7f0e0438dce482fa32015.tar.gz
cpython-e76b7a8fcd769c4204a7f0e0438dce482fa32015.tar.bz2
Added fnmatch, base64 and quopri, received from Andrew Kuchling.
Diffstat (limited to 'Doc/lib')
-rw-r--r--Doc/lib/lib.tex3
-rw-r--r--Doc/lib/liballos.tex3
-rw-r--r--Doc/lib/libbase64.tex43
-rw-r--r--Doc/lib/libfnmatch.tex38
-rw-r--r--Doc/lib/libquopri.tex31
-rw-r--r--Doc/lib/libwww.tex6
6 files changed, 124 insertions, 0 deletions
diff --git a/Doc/lib/lib.tex b/Doc/lib/lib.tex
index fd98bfa..f9e23aa 100644
--- a/Doc/lib/lib.tex
+++ b/Doc/lib/lib.tex
@@ -112,6 +112,7 @@ to Python and how to embed it in other applications.
\input{libtempfile}
\input{liberrno}
\input{libglob}
+\input{libfnmatch}
\input{libsomeos} % Optional Operating System Services
\input{libsignal}
@@ -156,6 +157,8 @@ to Python and how to embed it in other applications.
\input{libbinascii}
\input{libxdrlib}
\input{libmailcap}
+\input{libbase64}
+\input{libquopri}
\input{librestricted}
\input{librexec}
diff --git a/Doc/lib/liballos.tex b/Doc/lib/liballos.tex
index 5cf7f94..2a536cd 100644
--- a/Doc/lib/liballos.tex
+++ b/Doc/lib/liballos.tex
@@ -26,4 +26,7 @@ systems as well. Here's an overview:
\item[glob]
--- Unix shell style pathname pattern expansion.
+\item[fnmatch]
+--- Unix shell style pathname pattern matching.
+
\end{description}
diff --git a/Doc/lib/libbase64.tex b/Doc/lib/libbase64.tex
new file mode 100644
index 0000000..c487576
--- /dev/null
+++ b/Doc/lib/libbase64.tex
@@ -0,0 +1,43 @@
+\section{Standard Module \sectcode{base64}}
+\stmodindex{base64}
+
+This module perform base-64 encoding and decoding of arbitrary binary
+strings into text strings that can be safely emailed or posted. The
+encoding scheme is defined in RFC 1421 and is used for MIME email and
+various other Internet-related applications; it is not the same as the
+output produced by the \file{uuencode} program. For example, the
+string \code{'www.python.org'} is encoded as the string
+\code{'d3d3LnB5dGhvbi5vcmc=\e n'}.
+\indexii{base-64}{encoding}
+\indexii{RFC}{1421}
+\index{MIME, base 64 encoding}
+
+\begin{funcdesc}{decode}{input\, output}
+Decode the contents of the \var{input} file and write the resulting
+binary data to the \var{output} file.
+\var{input} and \var{output} must either be file objects or objects that
+mimic the file object interface. \var{input} will be read until
+\code{\var{input}.read()} returns an empty string.
+\end{funcdesc}
+
+\begin{funcdesc}{decodestring}{s}
+Decode the string \var{s}, which must contain one or more lines of
+base-64 encoded data, and return a string containing the resulting
+binary data.
+\end{funcdesc}
+
+\begin{funcdesc}{encode}{input\, output}
+Encode the contents of the \var{input} file and write the resulting
+base-64 encoded data to the \var{output} file.
+\var{input} and \var{output} must either be file objects or objects that
+mimic the file object interface. \var{input} will be read until
+\code{\var{input}.read()} returns an empty string.
+\end{funcdesc}
+
+\begin{funcdesc}{encodestring}{s}
+Encode the string \var{s}, which can contain arbitrary binary data,
+and return a string containing one or more lines of
+base-64 encoded data.
+\end{funcdesc}
+
+
diff --git a/Doc/lib/libfnmatch.tex b/Doc/lib/libfnmatch.tex
new file mode 100644
index 0000000..78b21a4
--- /dev/null
+++ b/Doc/lib/libfnmatch.tex
@@ -0,0 +1,38 @@
+\section{Standard Module \sectcode{fnmatch}}
+\stmodindex{fnmatch}
+
+This module provides support for Unix shell-style wildcards, which are
+\emph{not} the same as Python's regular expressions (which are
+documented in the \code{regex} module). The special characters used
+in shell-style wildcards are:
+\begin{itemize}
+\item[\code{*}] matches everything
+\item[\code{?}] matches any single character
+\item[\code{[}\var{seq}\code{]}] matches any character in \var{seq}
+\item[\code{[!}\var{seq}\code{]}] matches any character not in \var{seq}
+\end{itemize}
+
+Note that the filename separator (\code{'/'} on Unix) is \emph{not}
+special to this module. See module \code{glob} for pathname expansion
+(\code{glob} uses \code{fnmatch} to match filename segments).
+
+\begin{funcdesc}{fnmatch}{filename\, pattern}
+Test whether the \var{filename} string matches the \var{pattern}
+string, returning true or false. If the operating system is
+case-insensitive, then both parameters will be normalized to all
+lower- or upper-case before the comparision is performed. If you
+require a case-sensitive comparision regardless of whether that's
+standard for your operating system, use \code{fnmatchcase()} instead.
+\end{funcdesc}
+
+\begin{funcdesc}{fnmatchcase}{}
+Test whether \var{filename} matches \var{pattern}, returning true or
+false; the comparision is case-sensitive.
+\end{funcdesc}
+
+\begin{funcdesc}{translate}{pattern}
+Translate a shell pattern into a corresponding regular expression,
+returning a string describing the pattern. It does not compile the
+expression.
+\end{funcdesc}
+
diff --git a/Doc/lib/libquopri.tex b/Doc/lib/libquopri.tex
new file mode 100644
index 0000000..0314f8a
--- /dev/null
+++ b/Doc/lib/libquopri.tex
@@ -0,0 +1,31 @@
+\section{Standard Module \sectcode{quopri}}
+\stmodindex{quopri}
+
+This module performs quoted-printable transport encoding and decoding,
+as defined in RFC 1521: ``MIME (Multipurpose Internet Mail Extensions)
+Part One''. The quoted-printable encoding is designed for data where
+there are relatively few nonprintable characters; the base-64 encoding
+scheme available via the \code{base64} module is more compact if there
+are many such characters, as when sending a graphics file.
+\indexii{quoted printable}{encoding}
+\indexii{RFC}{1521}
+\index{MIME!quoted-printable encoding}
+
+\begin{funcdesc}{decode}{input\, output}
+Decode the contents of the \var{input} file and write the resulting
+decoded binary data to the \var{output} file.
+\var{input} and \var{output} must either be file objects or objects that
+mimic the file object interface. \var{input} will be read until
+\code{\var{input}.read()} returns an empty string.
+\end{funcdesc}
+
+\begin{funcdesc}{encode}{input\, output\, quotetabs}
+Encode the contents of the \var{input} file and write the resulting
+quoted-printable data to the \var{output} file.
+\var{input} and \var{output} must either be file objects or objects that
+mimic the file object interface. \var{input} will be read until
+\code{\var{input}.read()} returns an empty string.
+\end{funcdesc}
+
+
+
diff --git a/Doc/lib/libwww.tex b/Doc/lib/libwww.tex
index aae20b2..93bce63 100644
--- a/Doc/lib/libwww.tex
+++ b/Doc/lib/libwww.tex
@@ -68,4 +68,10 @@ written by Sun Microsystems, Inc. June 1987.
\item[mailcap]
--- Mailcap file handling. See RFC 1524.
+\item[base64]
+--- Encode/decode binary files using the MIME base64 encoding.
+
+\item[quopri]
+--- Encode/decode binary files using the MIME quoted-printable encoding.
+
\end{description}