def expandpath(path, force_absolute=True):
    'Expand all variables and user handles in a path.\n\n    By default return an absolute path\n    '
    path = expandvars(expanduser(path))
    if force_absolute:
        path = abspath(path)
    return path
Expand all variables and user handles in a path.

By default return an absolute path
def expandpath(path, force_absolute=True):
    'Expand all variables and user handles in a path.\n\n    By default return an absolute path\n    '
    path = expandvars(expanduser(path))
    if force_absolute:
        path = abspath(path)
    return path