Returns the absolute, normalized, real path  of something.
    This takes care of symbolic links, redundant separators, etc.

def canonizePath(path):
    """Returns the absolute, normalized, real path  of something.
    This takes care of symbolic links, redundant separators, etc."""
    return os.path.abspath(os.path.normpath(os.path.realpath(path)))