Directory Traversal

Justin Sheehy dworkin at
Thu Mar 2 04:28:00 CET 2000

"Alexander, Jason" <jalexander at> 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().



More information about the Python-list mailing list