[Python-Dev] My summary of the scandir (PEP 471) (original) (raw)

Victor Stinner victor.stinner at gmail.com
Tue Jul 1 09:48:49 CEST 2014


Hi,

@Ben: it's time to update your PEP to complete it with this discussion! IMO DirEntry must be as simple as possible and portable:

Notes:

interesting = [] for name in os.listdir(path): fullpath = os.path.join(path, name) if os.path.isdir(fullpath): continue if ... test on the file ...: # i need the full path here, not the relative path # (ex: my own recursive "scandir"/"walk" function) interesting.append(fullpath)

Victor



More information about the Python-Dev mailing list