Directory Traversal

Justin Sheehy dworkin at ccs.neu.edu
Wed Mar 1 22:28:00 EST 2000


"Alexander, Jason" <jalexander at aivia.net> writes:

> On my current project I'm attempting to traverse down a given directory, and
> I'm coming across the dilemma of having a difficult time being able to
> discern a file from a directory when using the os.listdir() call... 
> anyone give any insight to this?

While Hans Nowak already answered your question, you may also find it
worthwhile to look at os.path.walk().

-Justin

 




More information about the Python-list mailing list