I have a directory logfiles. I want to process each file inside this directory using a Python script.
for file in directory: # do something
With os.listdir() or os.walk(), depending on whether you want to do it recursively.