📅  最后修改于: 2022-03-11 14:45:49.324000             🧑  作者: Mango
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:
........