“glob” Respostas de código

Python Glob

import glob

print 'Named explicitly:'
for name in glob.glob('dir/subdir/*'):
    print '\t', name

print 'Named with wildcard:'
for name in glob.glob('dir/*/*'):
    print '\t', name
Clumsy Cassowary

Subdiretórios Glob Python

import glob

subdirectories = glob.glob("./*/")
Attractive Addax

glob

The glob module finds all the pathnames matching a specified pattern 
according to the rules used by the Unix shell, although results are 
returned in arbitrary order
Viper

Respostas semelhantes a “glob”

Perguntas semelhantes a “glob”

Procure respostas de código populares por idioma

Procurar outros idiomas de código