tests/readlink.py
author David Soria Parra <dsp@php.net>
Wed, 16 Feb 2011 01:29:26 +0100
changeset 13416 5431b3f3e52e
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
bookmarks: make track.current=True default behaviour and remove option (BC)

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