Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
8d2c0c2a
Kaydet (Commit)
8d2c0c2a
authored
Mar 16, 1999
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed minor nits, added index entries to make these easier to find for people
not familiar with Unix terminology.
üst
c43e6a2f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
libfnmatch.tex
Doc/lib/libfnmatch.tex
+8
-6
libglob.tex
Doc/lib/libglob.tex
+9
-3
No files found.
Doc/lib/libfnmatch.tex
Dosyayı görüntüle @
8d2c0c2a
\section
{
\module
{
fnmatch
}
---
\UNIX
{}
shell style pathname pattern matching.
}
\declaremodule
{
standard
}{
fnmatch
}
\UNIX
{}
style filename pattern matching
}
\modulesynopsis
{
\UNIX
{}
shell style pathname pattern matching.
}
\declaremodule
{
standard
}{
fnmatch
}
\modulesynopsis
{
\UNIX
{}
shell style filename pattern matching.
}
This module provides support for
\UNIX
{}
shell-style wildcards, which
are
\emph
{
not
}
the same as regular expressions (which are documented
in the
\module
{
re
}
\refstmodindex
{
re
}
module). The special characters
used in shell-style wildcards are:
in the
\refmodule
{
re
}
\refstmodindex
{
re
}
module). The special
characters used in shell-style wildcards are:
\index
{
filenames!wildcard expansion
}
\begin{list}
{}{
\leftmargin
0.5in
\labelwidth
0.45in
}
\item
[\code{*}]
matches everything
...
...
@@ -38,6 +39,7 @@ Test whether \var{filename} matches \var{pattern}, returning true or
false; the comparision is case-sensitive.
\end{funcdesc}
\begin{seealso}
\seemodule
{
glob
}{
Shell-style path expansion
}
\seemodule
{
glob
}{
Shell-style path expansion
}
\end{seealso}
Doc/lib/libglob.tex
Dosyayı görüntüle @
8d2c0c2a
\section
{
\module
{
glob
}
---
\UNIX
{}
shell style pathname pattern expansion.
}
\declaremodule
{
standard
}{
glob
}
\UNIX
{}
style pathname pattern expansion
}
\declaremodule
{
standard
}{
glob
}
\modulesynopsis
{
\UNIX
{}
shell style pathname pattern expansion.
}
...
...
@@ -13,13 +13,14 @@ using the \function{os.listdir()} and \function{fnmatch.fnmatch()}
functions in concert, and not by actually invoking a subshell. (For
tilde and shell variable expansion, use
\function
{
os.path.expanduser()
}
and
\function
{
os.path.expandvars()
}
.)
\index
{
filenames!pathname expansion
}
\begin{funcdesc}
{
glob
}{
pathname
}
Returns a possibly-empty list of path names that match
\var
{
pathname
}
,
which must be a string containing a path specification.
\var
{
pathname
}
can be either absolute (like
\file
{
/usr/src/Python-1.5/Makefile
}
) or relative (like
\file
{
../../Tools/*.gif
}
), and can contain shell-style wildcards.
\file
{
../../Tools/*
/*
.gif
}
), and can contain shell-style wildcards.
\end{funcdesc}
For example, consider a directory containing only the following files:
...
...
@@ -36,3 +37,8 @@ of the path are preserved.
>>> glob.glob('?.gif')
['1.gif']
\end{verbatim}
\begin{seealso}
\seemodule
{
fnmatch
}{
Shell-style filename (not path) expansion
}
\end{seealso}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment