saswat at gmail.com wrote: > File symLinkTest is a symbolic link. > > Why S_ISLNK(mode) returns False and S_ISREG(mode) returns True ? Because you are using os.stat() instead of os.lstat(). http://docs.python.org/lib/os-file-dir.html Christian