Re: more os.walk() issues... probably user error

2005-02-16 Thread Kent Johnson
rbt wrote: ## for fs in fs_objects: ## ##for f in fs[2]: ##if f in file_skip_list: ##print f ##fs[2].remove(f) ## ##for d in fs[1]: ##if d in dir_skip_list: ##print d ##

Re: more os.walk() issues... probably user error

2005-02-16 Thread rbt
Kent Johnson wrote: rbt wrote: rbt wrote: This function is intended to remove unwanted files and dirs from os.walk(). It will return correctly *IF* I leave the 'for fs in fs_objects' statement out (basically leave out the entire purpose of the function). It's odd, when the program goes into tha

Re: more os.walk() issues... probably user error

2005-02-16 Thread Kent Johnson
rbt wrote: rbt wrote: This function is intended to remove unwanted files and dirs from os.walk(). It will return correctly *IF* I leave the 'for fs in fs_objects' statement out (basically leave out the entire purpose of the function). It's odd, when the program goes into that statment... even w

Re: more os.walk() issues... probably user error

2005-02-16 Thread Dan Perl
"rbt" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > def build_clean_list(self, path): > > file_skip_list = ['search_results.txt'] > dir_skip_list = ['dev', 'proc', 'Temporary Internet Files'] > > fs_objects = os.walk(path, topdown=True) > ## for fs

Re: more os.walk() issues... probably user error

2005-02-16 Thread Dan Perl
"rbt" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > rbt wrote: >> This function is intended to remove unwanted files and dirs from >> os.walk(). It will return correctly *IF* I leave the 'for fs in >> fs_objects' statement out (basically leave out the entire purpose of the >> f

Re: more os.walk() issues... probably user error

2005-02-16 Thread [EMAIL PROTECTED]
That's an easy one: fs_objects is not modified by your ode, so you get it back as created by os.walk -- http://mail.python.org/mailman/listinfo/python-list

Re: more os.walk() issues... probably user error

2005-02-16 Thread rbt
rbt wrote: This function is intended to remove unwanted files and dirs from os.walk(). It will return correctly *IF* I leave the 'for fs in fs_objects' statement out (basically leave out the entire purpose of the function). It's odd, when the program goes into that statment... even when only a