import os

def readlinkabs(l):
    """
    Return an absolute path for the destination 
    of a symlink
    """
    if not (os.path.islink(l)):
        return None
    p = os.readlink(l)
    if os.path.isabs(p):
        return p
    return os.path.join(os.path.dirname(l), p)


[((10, 8, 10, 22), 'os.readlink', 'os.readlink', ({(10, 20, 10, 21): 'l'}, {}), '(l)', False, 'import os\n'), ((11, 7, 11, 23), 'os.path.isabs', 'os.path.isabs', ({(11, 21, 11, 22): 'p'}, {}), '(p)', False, 'import os\n'), ((8, 12, 8, 29), 'os.path.islink', 'os.path.islink', ({(8, 27, 8, 28): 'l'}, {}), '(l)', False, 'import os\n'), ((13, 24, 13, 42), 'os.path.dirname', 'os.path.dirname', ({(13, 40, 13, 41): 'l'}, {}), '(l)', False, 'import os\n')]