import pathlib import os directory: pathlib.Path = some/path/_object for file in os.listdir(directory.__str__()): file_path: pathlib.Path = directory / file pass