def expand_path(pathname):
    # The following logic previously used regular expressions but that approach
    # turned out to be very error prone, hence the current contraption based on
    # direct string manipulation :-).
    home_directory = find_home_directory()
    separators = set([os.sep])
    if os.altsep is not None:
        separators.add(os.altsep)
    if len(pathname) >= 2 and pathname[0] == '~' and pathname[1] in separators:
        pathname = os.path.join(home_directory, pathname[2:])
    # Also expand environment variables.
    return parse_path(pathname)
Provides a way to modify the following attributes of a domain
dataset/ETHPy150Open paylogic/pip-accel/pip_accel/utils.py/expand_path--crossover with--dataset/ETHPy150Open rackspace/pyrax/pyrax/clouddns.py/CloudDNSDomain.update