def absolute_path_link(path):
 if os.path.islink(path):
  link = os.readlink(path)
  if (not os.path.isabs(link)):
   link = os.path.join(os.path.dirname(path), link)
 else:
  link = os.path.abspath(path)
 return link

def absolute_path_link ( path ) : if os . path . islink ( path ) : link = os . readlink ( path ) if ( not os . path . isabs ( link ) ) : link = os . path . join ( os . path . dirname ( path ) , link ) else : link = os . path . abspath ( path ) return link
returns an absolute path for the destination of a symlink .