Checking if the file is a symlink fails

Christian Heimes lists at
Fri Aug 29 00:11:17 CEST 2008

saswat at 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().


More information about the Python-list mailing list