How can I check if the listdir result a directory?

Plissken.s at gmail.com Plissken.s at gmail.com
Fri Mar 23 01:40:17 EDT 2007


I have the following code which list out all the files/directories
under the current directory.

But how can I find out if 'f' is a directory?

for f in os.listdir("."):
     // how can I check if 'f' a directory?




More information about the Python-list mailing list