How to identify whether a file is normal file or directory

os.path.isdir() and os.path.isfile() should give you what you want. See:
http://docs.python.org/library/os.path.html

Leave a Comment