diff options
author | Guido van Rossum <guido@python.org> | 1997-04-27 21:25:52 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-04-27 21:25:52 (GMT) |
commit | e76b7a8fcd769c4204a7f0e0438dce482fa32015 (patch) | |
tree | 2a9c31b1cbe429d5b5a09b37f03d210b07678cb0 /Doc/libfnmatch.tex | |
parent | 8be9a116175fbc5cea9d93e5e998af0df4cee23b (diff) | |
download | cpython-e76b7a8fcd769c4204a7f0e0438dce482fa32015.zip cpython-e76b7a8fcd769c4204a7f0e0438dce482fa32015.tar.gz cpython-e76b7a8fcd769c4204a7f0e0438dce482fa32015.tar.bz2 |
Added fnmatch, base64 and quopri, received from Andrew Kuchling.
Diffstat (limited to 'Doc/libfnmatch.tex')
-rw-r--r-- | Doc/libfnmatch.tex | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Doc/libfnmatch.tex b/Doc/libfnmatch.tex new file mode 100644 index 0000000..78b21a4 --- /dev/null +++ b/Doc/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} + |