To search for .jpg files in the folder "myfoder" you can do:
import os,fnmatch
for fileName in os.listdir ( "myfolder" ):
if fnmatch.fnmatch ( fileName, '*.jpg' ):
print "Found fileName ",fileName
Part of the externalization of my cognitive functions ... what ?
To search for .jpg files in the folder "myfoder" you can do:
import os,fnmatch
for fileName in os.listdir ( "myfolder" ):
if fnmatch.fnmatch ( fileName, '*.jpg' ):
print "Found fileName ",fileName
Aucun commentaire:
Enregistrer un commentaire