Re: [閒聊] pydoc glob 有幾個字看不懂
他其實文件有寫差異耶,但沒提到 case-[in]sensitive 就是了。
The glob module finds all the pathnames matching a specified pattern
according to the rules used by the Unix shell. No tilde expansion is done,
but *, ?, and character ranges expressed with [] will be correctly matched.
This is done by using the os.listdir() and fnmatch.fnmatch() functions in
concert, and not by actually invoking a subshell. (For tilde and shell
variable expansion, use os.path.expanduser() and os.path.expandvars().)
glob.glob(pathname)
"Return a possibly-empty list of path names that match pathname", ... blah
glob.iglob(pathname)
"Return an >>iterator which yields the same values as glob() without actually
storing them all simultaneously."
※ 引述《jlovet (打不贏怪兵器不好)》之銘言:
: $pydoc glob
: FUNCTIONS
: glob(pathname)
: Return a list of paths matching a pathname pattern.
: The pattern may contain simple shell-style wildcards a la fnmatch.
: iglob(pathname)
: Return a list of paths matching a pathname pattern.
: The pattern may contain simple shell-style wildcards a la fnmatch.
: 問題
: glob跟iglob有差嗎?
: a la fnmatch 是什麼意思?
--
LinmiC SouL - http://linmic.cooplex.tw/blog
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.62.77.66
推
09/08 23:47, , 1F
09/08 23:47, 1F
→
09/11 08:17, , 2F
09/11 08:17, 2F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 3 篇):
Python 近期熱門文章
PTT數位生活區 即時熱門文章