Pruning with os.scandir?

Stephen Kennedy muchomojo at gmail.com
Thu Aug 6 15:37:15 CEST 2015


> I think you misunderstood. scandir() is the generator-producing equivalent 
> of listdir() which returns a list. Neither of them recurses into 
> subdirectories:

Ah great, that makes sense. An article I read gave the impression that os.scandir() was replacing os.walk(), not simply being used in its implementation.

Thanks,
Stephen.


More information about the Python-list mailing list