>>> Import glob
>>> Dir (glob)
['_ All _', '_ builtins _', '_ Doc _', '_ file __', '_ name _', 'fnmatch', 'glob', 'glob1 ', 'has _ magic', 'Magic _ check', 'OS', 'Re']
>>> Help (glob)
Help on module glob:
Name
Glob-filename globbing utility.
File
D:/python24/lib/glob. py
Functions
Glob (pathname)
Return a list of paths matching a pathname pattern.
The pattern may contain simple shell-style wildcards a la fnmatch.
data
_ all _ = ['glob']
its main method is glob, it is very convenient to process a batch of file names in the script, for example:
>> glob. glob ("C: //")
['C: // ']
glob. glob ("C: // *")
['C: // arcldr.exe ', 'c: // arcsetup.exe', 'c: // boot. INI ', 'c: // bootfont. bin', 'c: // cmd.txt ', 'c: // command. com ', 'c: // config. sys ', 'c: // debug_trace.txt', 'c: // devtools ', 'c: // dfimb. dat ', 'c: // documents and settings', 'c: // intel', 'c: // Io. sys ', 'c: // msdos. sys ', 'c: // msocache', 'c: // ntdetect. com ', 'c: // ntldr', 'c: // pagefile. sys ', 'c: // program files', 'c: // recycled ', 'c: // recycler', 'c: // response.txt ', 'c: // RT ', 'c: // suhdlog. dat ', 'c: // system volume information', 'c: // useprint. bat ', 'c: // videorom. bin', 'c: // Windows', 'c: // wmpub ', 'c: // wutemp']
>> glob. glob ("C ://*. TXT ")
['C: // example .txt ', 'c: // debug_trace.txt', 'c: // response.txt ']