tests/readlink.py
author Jens Bäckman <jens.backman@gmail.com>
Tue, 23 Mar 2010 21:58:51 +0100
branchstable
changeset 10778 e703af672d9d
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
i18n-sv: synchronized with a1cb8ca051c0 Some simpler translations done too

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