os.supports_follow_symlinks
A Set
object indicating which functions in the os
module permit use of their follow_symlinks parameter. Different platforms provide different functionality, and an option that might work on one might be unsupported on another. For consistency’s sakes, functions that support follow_symlinks always allow specifying the parameter, but will raise an exception if the functionality is not actually available.
To check whether a particular function permits use of its follow_symlinks parameter, use the in
operator on supports_follow_symlinks
. As an example, this expression determines whether the follow_symlinks parameter of os.stat()
is locally available:
os.stat in os.supports_follow_symlinks
New in version 3.3.
Please login to continue.