Re: [閒聊] pydoc glob 有幾個字看不懂
※ 引述《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 是什麼意思?
不是 case insensitive喔...
iglob會回傳一個iterator
In [4]: a=iglob("*.h")
In [5]: print a
<generator object at 0x960644c>
In [6]: print a.next()
1.h
In [8]: print a
<generator object at 0x9eb44ac>
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.123.102.254
推
09/08 16:15, , 1F
09/08 16:15, 1F
→
09/08 16:16, , 2F
09/08 16:16, 2F
推
09/08 17:22, , 3F
09/08 17:22, 3F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 3 之 3 篇):
Python 近期熱門文章
PTT數位生活區 即時熱門文章