def iter_inis(path):
    try:
        for filename in os.listdir(path):
            if not filename.endswith('.ini') or filename[:1] in '_.':
                continue
            fn = os.path.join(path, filename)
            if os.path.isfile(fn):
                base = filename[:-4].decode('ascii', 'replace')
                inifile = IniFile(fn)
                yield base, inifile
    except OSError as e:
        if e.errno != errno.ENOENT:
            raise
dataset/ETHPy150Open lektor/lektor-archive/lektor/datamodel.py/iter_inis/original