How do you check whether a file is a normal file or a directory using python?
os.path.isdir() and os.path.isfile() should give you what you want. See: http://docs.python.org/library/os.path.html
os.path.isdir()
os.path.isfile()
1.4m articles
1.4m replys
5 comments
57.0k users