tests/readlink.py
author Jean-Francois Pieronne <jf.pieronne@laposte.net>
Wed, 11 Oct 2023 15:15:28 +0200
changeset 51006 44001e6f04de
parent 48966 6000f5b25c9b
permissions -rwxr-xr-x
opemvms: add specific files and utilities

#!/usr/bin/env python3


import errno
import os
import sys

for f in sys.argv[1:]:
    try:
        print(f, '->', os.readlink(f))
    except OSError as err:
        if err.errno != errno.EINVAL:
            raise
        print(f, '->', f, 'not a symlink')

sys.exit(0)