Example usage:
import os, glob
TEMP_DIR = '/tmp/whatever'
for file in glob.glob(os.path.join(TEMP_DIR, '*.tmp')):
os.remove(file)
The glob module contains just two functions: glob() and its case-insensitive generator-returning equivalent, iglob().
No comments:
Post a Comment