how to know whether the item in a diretory is a file/directory

Ben C benc1 at
Wed Aug 1 10:19:41 CEST 2001

Your answer lies in

os.path.isdir or os.path.isfile

"sdf" <wqh-2 at> wrote in message news:<mailman.996630962.3179.python-list at>...
> I want to process all the files in a diretory,and ignore the subdirectorys in it
> ,I use  os.listdir() to list all the items,but I do not know whether the selected
> item is a file
> __________________________________________
> DVD大片,一律10元
> 美容养颜、减肥瘦身秘诀

More information about the Python-list mailing list