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)


[((173, 187), 'os.readlink', 'os.readlink', (['l'], {}), '(l)\n', (184, 187), False, 'import os\n'), ((195, 211), 'os.path.isabs', 'os.path.isabs', (['p'], {}), '(p)\n', (208, 211), False, 'import os\n'), ((125, 142), 'os.path.islink', 'os.path.islink', (['l'], {}), '(l)\n', (139, 142), False, 'import os\n'), ((254, 272), 'os.path.dirname', 'os.path.dirname', (['l'], {}), '(l)\n', (269, 272), False, 'import os\n')]