os.path.walk -- Can You Limit Directories Returned?

2008-06-04 Thread Jeff Nyman
Greetings all. I did some searching on this but I can't seem to find a specific solution. I have code like this: = def walker1(arg, dirname, names): DC_List.append((dirname,'')) os.path.walk('vcdcflx006\\Flex\\Sites', walker1, 0) ==

Re: os.path.walk -- Can You Limit Directories Returned?

2008-06-05 Thread Jeff Nyman
Thank you to everyone for your help. Much appreciated. I now have a better understanding of how glob can be used and I have a much better understanding of using the more effective os.walk. - Jeff -- http://mail.python.org/mailman/listinfo/python-list

Creating A Tuple From A List, Adding To Tuple As You Do

2008-06-05 Thread Jeff Nyman
Greetings all. The subject line of this thread is probably one of the worst ever. I was trying to encapsulate what I am doing. Based on my new-found knowledge from another thread, I'm able to get a list of directories and they come to me in the form of a list. Here is an example: from glob import

Re: Creating A Tuple From A List, Adding To Tuple As You Do

2008-06-05 Thread Jeff Nyman
Thanks to everyone who responded! Yes, those solutions all work and do what I need. I'm also getting much more familiar with how flexible Python is in terms of its language. I think that's been the hardest challenge for me. I'm usually finding I try to "overdo it" when coming up with solutions. O