(dir)
Do os.walk in a reproducible way,
    independent of indeterministic filesystem readdir order
Do os.walk in a reproducible way,
    independent of indeterministic filesystem readdir order
Do os . walk in a reproducible way independent of indeterministic filesystem readdir order
def sorted_walk(dir):
    """Do os.walk in a reproducible way,
    independent of indeterministic filesystem readdir order
    """
    for base, dirs, files in os.walk(dir):
        dirs.sort()
        files.sort()
        yield base, dirs, files
def sorted_walk ( dir ) : for base , dirs , files in os . walk ( dir ) : dirs . sort ( ) files . sort ( ) yield base , dirs , files