Re: os.walk() usage

2005-02-15 Thread rbt
[EMAIL PROTECTED] wrote: every object in os.walk() returns a 3-tuple, like below, it seems your code assumes it returns only a list of files. for d in os.walk('c:\\temp'): (dirpath, dirnames, filenames) = d print dirpath print dirnames print filenames Thank you, this

RE: os.walk() usage

2005-02-15 Thread Batista, Facundo
Title: RE: os.walk() usage [rbt] #- The problem I'm encountering is passing the list to other functions. #- It's almost as if each function needs to build the list #- itself (walk the #- filesystem)... which gets in the way of what I was asked to #- do (break #- this thi

Re: os.walk() usage

2005-02-15 Thread bruno modulix
rbt wrote: I'm trying to write very small, modular code as functions to break up a big monolithic script that does a file system search for particular strings. The script works well, but it's not easy to maintain or add features to. I'd like to have a function that builds a list of files with o

Re: os.walk() usage

2005-02-15 Thread [EMAIL PROTECTED]
every object in os.walk() returns a 3-tuple, like below, it seems your code assumes it returns only a list of files. for d in os.walk('c:\\temp'): (dirpath, dirnames, filenames) = d print dirpath print dirnames print filenames -- http://mail.python.org/mailman/lis