This post originated from an RSS feed registered with Python Buzz
by Jarno Virtanen.
Original Post: os.walk()
Feed Title: Python owns us
Feed URL: http://sedoparking.com/search/registrar.php?domain=®istrar=sedopark
Feed Description: A weblog about Python from the view point of Jarno Virtanen.
Live and learn. Apparently, the os
module in Python 2.3 has a walk() function that
provides a somewhat similar functionality as the path's walkdir(); the iteration from my
previous example could be replaced with something like this:
for directory, subdirectory_list, filelist in os.walk(root):
directory_list.append((len(filelist), directory))