Juliano Freitas <[EMAIL PROTECTED]> writes:
> how can i get just the directories in other directorie without a
> files using the os module in Python??
If there's a command for listing only dirs, I've not stumbled on it.
Here's a one-liner using filter and lambda;
from os import listdir
from os.path import isdir
dir = '/tmp/'
onlyDirs = filter(lambda entry: isdir(dir + entry), listdir(dir))
HTH
--
-------------------------------------------------------------------------------
Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant
305 321-1144 (mobile http://www.JerrySievers.com/
--
http://mail.python.org/mailman/listinfo/python-list