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
##
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
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
"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
"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
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
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