Re: Walking through directories and files

2005-09-16 Thread Fredrik Lundh
Thierry Lam wrote: > I'm trying to use the os.walk() method to search all the directory from > a root directory and display their contents. For example, I want my > output to be like the following: > > > directoryA > stuffs.c > stuffs2.cpp > > directoryB > asd.c > asdf.cpp > > Any ideas how to do

Walking through directories and files

2005-09-16 Thread Thierry Lam
I'm trying to use the os.walk() method to search all the directory from a root directory and display their contents. For example, I want my output to be like the following: directoryA stuffs.c stuffs2.cpp directoryB asd.c asdf.cpp Any ideas how to do it? Currently, I can only print all the fil