By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,818 Members | 1,223 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,818 IT Pros & Developers. It's quick & easy.

retrieeving directory folders and sub folders

P: 1
I Need Code For Retrieving Folders And Sub Folders Usng Python. May Be According To A Specific Condition May Be Say Folder With Names Www Etc..
Please Help
Aug 3 '07 #1
Share this Question
Share on Google+
3 Replies


Expert 100+
P: 511
I Need Code For Retrieving Folders And Sub Folders Usng Python. May Be According To A Specific Condition May Be Say Folder With Names Www Etc..
Please Help
Use the os.walk() method. See here
Aug 3 '07 #2

P: 5
It is helpful to wrap os.walk to create a custom generator. My version of this was published in the Python Cookbook, a must-have text for anyone working in the language. A simpler version is on my programming blog if you want a quick demonstration.
Aug 9 '07 #3

bartonc
Expert 5K+
P: 6,596
It is helpful to wrap os.walk to create a custom generator. My version of this was published in the Python Cookbook, a must-have text for anyone working in the language. A simpler version is on my programming blog if you want a quick demonstration.
Thanks, Robin. I checked out you site: It's quite nice and the link doesn't seem to violate any Posting Guidelines. I hope you stick around and grab a few questions along the way.

Thanks for joining,
Barton
Aug 10 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.