Is os.lstat available on all platforms?

Giampaolo Rodola' gnewsg at gmail.com
Thu Nov 29 16:17:43 EST 2007


Hi there.
In a code of mine I'd like to use os.lstat whenever possible.
My only concern is if it's available on all platforms.
It could be safe using always os.lstat instead of:

try:
    os.lstat
except AttributeError:
    os.stat

...?
As far as I know where symlinks are not supported os.lstat should be
an alias for os.stat but I'm not 100% sure.



More information about the Python-list mailing list