check a directory

Raj kumar k_r_a_j_kumar at yahoo.co.in
Mon Feb 25 04:31:54 EST 2008


Hi all,
I'm using following code...

for x in listdir(path)
    some code.....

but how i can check whether x is a directory or not?
Because listdir() is giving all the files present in that path....

Thanks in advance.




      Did you know? You can CHAT without downloading messenger. Go to http://in.messenger.yahoo.com/webmessengerpromo.php/ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080225/ce6d6aa8/attachment.html>


More information about the Python-list mailing list