Re: Checking if the file is a symlink fails

2008-08-29 Thread [EMAIL PROTECTED]
On Aug 28, 10:20 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > 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. > >

Re: Checking if the file is a symlink fails

2008-08-28 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: 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. As that page states, that's a function used to interpret a mode flag returned by

Re: Checking if the file is a symlink fails

2008-08-28 Thread Miles
saswat wrote: > On Aug 28, 3:11 pm, Christian Heimes wrote: >> [EMAIL PROTECTED] 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(). > > Do you mean the following is de

Re: Checking if the file is a symlink fails

2008-08-28 Thread [EMAIL PROTECTED]
On Aug 28, 3:11 pm, Christian Heimes <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] 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-fil

Re: Checking if the file is a symlink fails

2008-08-28 Thread Christian Heimes
[EMAIL PROTECTED] 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 -- http://mail.python.org/mailman/listinfo/python-list