tests/readlink.py
author Steven Stallion <sstallion@gmail.com>
Sun, 15 Apr 2012 23:47:46 -0700
changeset 16442 9181188ffb5b
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
plan9: finalize documentation for next release

#!/usr/bin/env python

import errno, os, sys

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

sys.exit(0)