[Python-Dev] os.path.walk generator

Edward C. Jones edcjones@erols.com
Thu, 12 Dec 2002 11:43:42 -0500


I feel that "The Right Way" to walk through a directory tree is with a 
generator. Therefore I suggest that a generator

walk2(topdir, hidden=None)

be added to os.path. It yields all the files and directories under (and 
including) "topdir". If "hidden" is true, then hidden files and 
directories are included.

Thanks,
Ed Jones