file system iteration

rick ath-admin at vt.edu
Mon Oct 9 08:50:45 EDT 2006


Gerrit Holl wrote:
> The very least you can try:
> 
> import string
> string.ascii_uppercase
> 
> for c in string.ascii_uppercase:
>     if os.path.isdir('%s:/' % c):
>         ...
> 
> etc.
> But I suppose there should be a better way.

Oh yes, I do that. I spelled out the example very explicitly for 
clarity. I don't actually type in A-Z :)



More information about the Python-list mailing list