tests/readlink.py
author Matt Harbison <matt_harbison@yahoo.com>
Sat, 19 Oct 2024 00:57:52 -0400
changeset 52026 e4961a4b4300
parent 48875 6000f5b25c9b
permissions -rwxr-xr-x
contrib: drop python 3.7 from the Windows dependency installer script I'm tempted to drop 3.8 too, since we use 3.9 on Windows.

#!/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)