29 Aug 01:41
Re: Checking if the file is a symlink fails
From: saswat <at> gmail.com <saswat <at> gmail.com>
Subject: Re: Checking if the file is a symlink fails
Newsgroups: gmane.comp.python.general
Date: 2008-08-28 23:41:47 GMT
Subject: Re: Checking if the file is a symlink fails
Newsgroups: gmane.comp.python.general
Date: 2008-08-28 23:41:47 GMT
On Aug 28, 3:11 pm, Christian Heimes <li...@cheimes.de> wrote: > sas...@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 Do you mean the following is deprecated ? http://docs.python.org/lib/module-stat.html >From the documentation - S_ISLNK( mode) Return non-zero if the mode is from a symbolic link. Thanks -Saswat -- http://mail.python.org/mailman/listinfo/python-list
RSS Feed