Fichier d'ouverture de la boucle Python du répertoire

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