看板 Python 關於我們 聯絡資訊
他其實文件有寫差異耶,但沒提到 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
jlovet:請問一下你這文件怎麼叫出來的阿 09/08 23:47
linmic:官方文件阿...man/--help 只是概略性的功能敘述,要看官方 09/11 08:17