Re: [閒聊] pydoc glob 有幾個字看不懂

看板Python作者時間16年前 (2009/09/08 15:24), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串2/3 (看更多)
他其實文件有寫差異耶,但沒提到 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
官方文件阿...man/--help 只是概略性的功能敘述,要看官方
09/11 08:17, 2F
文章代碼(AID): #1AfWQrN9 (Python)
文章代碼(AID): #1AfWQrN9 (Python)