

def _iter_module_files():
    for module in list(sys.modules.values()):
        filename = getattr(module, '__file__', None)
        if filename:
            old = None
            while (not os.path.isfile(filename)):
                old = filename
                filename = os.path.dirname(filename)
                if (old == old):
                    break
            else:
                if (filename[(- 4):] in ('.pyc', '.pyo')):
                    filename = filename[:(- 1)]
                (yield filename)

dataset/ETHPy150Open Eforcers/gae-flask-todo/lib/werkzeug/serving.py _iter_module_files/VarMisuse@77/86 `filename`->`old`