os.lchflags(path, flags)

Set the flags of path to the numeric flags, like chflags(), but do not follow symbolic links. As of Python 3.3, this is equivalent to os.chflags(path, flags, follow_symlinks=False).

Raises an auditing event os.chflags with arguments path, flags.

Availability: Unix.

Changed in version 3.6: Accepts a path-like object.

Related Reading

os — Miscellaneous operating system interfaces