GIF89a;
# NL # V length # NL # END line = f.readline() if line.startswith("END"): break assert line.startswith("K ") L = int(line.split()[1]) key = f.read(L) result.append(key) f.readline() line = f.readline() assert line.startswith("V ") L = int(line.split()[1]) value = f.read(L) f.readline() f.close() return result possible_text_file = re.compile(r"\.([hc]|py|txt|sln|vcproj)$").search for root, dirs, files in os.walk('.'): if '.svn' in dirs: dirs.remove('.svn') for fn in files: if possible_text_file(fn): if 'svn:eol-style' not in proplist(root, fn): path = os.path.join(root, fn) os.system('svn propset svn:eol-style native "%s"' % path)