tests/readlink.py
author Adrian Buehlmann <adrian@cadifra.com>
Fri, 22 Jul 2011 09:53:15 +0200
changeset 14908 e2b5605501df
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
util: move "default" makedir to posix.py makedir is already defined in win32.py, which gets imported into util.py via windows.py if we are running on Windows

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