lib/util/fs.py
def resolve_abspath(path, start=None):
    '''
    Resolves `path` to an absolute path. If the path is already an absolute
    path, it is returned as-is. Otherwise, it is joined to the `start` path,
    which is assumed to be an absolute path.
    If `start` is not provided, the current working directory is used.
    '''
    if not isinstance(path, str):
        raise TypeError('path must be a str: %r' % (path))

    # attempt to expand things like '~/' before proceeding
    path = resolve_env(path)

    if os.path.isabs(path):
        logger.debug('path is already absolute: %s', path)
        return path

    logger.debug('path is not absolute, need to resolve it')
    if start is None:
        start = os.getcwd()
        logger.debug('using working directory for relative paths: %s', start)
    assert isinstance(start, str), 'start must be a str: %r' % (start)

    logger.debug('joining path, start: %s, %s', path, start)
    return os.path.join(path, start)

    Resolves `path` to an absolute path. If the path is already an absolute
    path, it is returned as-is. Otherwise, it is joined to the `start` path,
    which is assumed to be an absolute path.
    If `start` is not provided, the current working directory is used.
    
Resolves `path` to an absolute path. If the path is already an absolute
path, it is returned as-is. Otherwise, it is joined to the `start` path,
which is assumed to be an absolute path.
If `start` is not provided, the current working directory is used.
Resolves ` path ` to an absolute path . If the path is already an absolute path it is returned as - is . Otherwise it is joined to the ` start ` path which is assumed to be an absolute path . If ` start ` is not provided the current working directory is used .
def resolve_abspath(path, start=None):
    if not isinstance(path, str):
        raise TypeError('path must be a str: %r' % (path))
    path = resolve_env(path)
    if os.path.isabs(path):
        logger.debug('path is already absolute: %s', path)
        return path
    logger.debug('path is not absolute, need to resolve it')
    if start is None:
        start = os.getcwd()
        logger.debug('using working directory for relative paths: %s', start)
    assert isinstance(start, str), 'start must be a str: %r' % (start)
    logger.debug('joining path, start: %s, %s', path, start)
    return os.path.join(path, start)
def resolve_abspath ( path , start = None ) : if not isinstance ( path , str ) : raise TypeError ( 'path must be a str: %r' % ( path ) ) path = resolve_env ( path ) if os . path . isabs ( path ) : logger . debug ( 'path is already absolute: %s' , path ) return path logger . debug ( 'path is not absolute, need to resolve it' ) if start is None : start = os . getcwd ( ) logger . debug ( 'using working directory for relative paths: %s' , start ) assert isinstance ( start , str ) , 'start must be a str: %r' % ( start ) logger . debug ( 'joining path, start: %s, %s' , path , start ) return os . path . join ( path , start )
Resolves `path` to an absolute path.
Resolves ` path ` to an absolute path .
'''
    Resolves `path` to an absolute path. If the path is already an absolute
    path, it is returned as-is. Otherwise, it is joined to the `start` path,
    which is assumed to be an absolute path.
    If `start` is not provided, the current working directory is used.
    ''' # attempt to expand things like '~/' before proceeding
path
start