Determining whether it's a file or a directory?

Aaron Bingham bingham at cenix-bioscience.com
Fri Oct 8 11:54:15 CEST 2004


Dfenestr8 wrote:

>os.listdir("path") returns the names of all the items in a directory ok,
>but I need to know whether the item is a file or a directory.
>
>Can anybody tell me how this could be done?
>  
>
os.path.isdir("path")

Aaron




More information about the Python-list mailing list