Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
Custom walker that ignores specific filenames

        def walk_ignore(path):
    "Custom walker that ignores specific filenames"
    ignores = ('.*', '*~', '#*',)
    for dirpath, dirnames, filenames in os.walk(path):
        for pattern in ignores:
            filenames[:] = [n for n in filenames if not fnmatch(n, pattern)]
            dirnames[:] = [n for n in dirnames if not fnmatch(n, pattern)]
        yield dirpath, dirnames, filenames
        


src/l/a/lanyon-6/src/lanyon/autoreload.py   lanyon(Download)
import sys
import time
from utils import walk_ignore
 
try:
def get_mtimes(directory):
    global _win
    mtimes = {}
    for root, dirs, files in walk_ignore(directory):
        for filename in files: