Hynek Schlawack h...@ox.cx added the comment:
For the sake of completeness: what you're looking for is os.lstat.
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15461
___
New submission from coder.maliubiao maliub...@gmail.com:
the code:
import os,stat
mode=os.stat(a broken link file).st_mode
then i got :OSError: [Errno 2] No such file or directory.
why not just treat a broken link as something existing and don't report any
error.
--
components:
R. David Murray rdmur...@bitdance.com added the comment:
Because we are doing what the linux stat call (and command) does . See man
stat.
--
nosy: +r.david.murray
resolution: - invalid
stage: - committed/rejected
status: open - closed
___
Python