Python bucle APERTER ARRIGA DEL DIRECTORIO

basepath = "pathtodir/DataFiles/"
for filename in os.listdir(basepath):
    if filename.endswith(".log"): 
        print(os.path.join("./DataFiles", filename))

        with open(basepath + filename) as openfile:    
            for line in openfile:
            ........
Elated Elephant