ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-tutor
python-tutor
Re: [Tutor] walking down directories
by Alan Gauld other posts by this author
Mar 18 2006 4:53AM messages near this date
Re: [Tutor] walking down directories | [Tutor] Mysql BLOB strangeness?
> I am trying to write a function that takes a
>  directory's name, finds any subdirectories, and then
>  prints out the size of the files in all found
>  directories.

>  As you see, the problem is that there is another
>  directory under testFiles called testDir, but the
>  function doesn't check the directory for files.  The
>  function needs to find every directory (including
>  subdirectories within directories).  Any hints?  

You mean like the os.walk fiunction does?

Take a look at the OS topic in my tutor for an example
of using os.walk - its about quarter oif the way down.

Alan G.

_______________________________________________
Tutor maillist  -  Tutor@[...].org
http://mail.python.org/mailman/listinfo/tutor
Thread:
Christopher Spears
Steve Slevinski
Alan Gauld

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved