[Python-Dev] os.path.walk generator

Aahz aahz@pythoncraft.com
Thu, 12 Dec 2002 11:26:34 -0500


On Thu, Dec 12, 2002, Edward C. Jones wrote:
>
> 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.

python-dev is the wrong place for this discussion; you should post to
comp.lang.python and/or submit a feature request to SourceForge.  Best
of all, post a patch to SF.
-- 
Aahz (aahz@pythoncraft.com)           <*>         http://www.pythoncraft.com/

"To me vi is Zen.  To use vi is to practice zen.  Every command is a
koan.  Profound to the user, unintelligible to the uninitiated.  You
discover truth everytime you use it."  --reddy@lion.austin.ibm.com