()
return libpaths
On AIX, the buildtime searchpath is stored in the executable.
    as "loader header information".
    The command /usr/bin/dump -H extracts this info.
    Prefix searched libraries with LD_LIBRARY_PATH (preferred),
    or LIBPATH if defined. These paths are appended to the paths
    to libraries the python executable is linked with.
    This mimics AIX dlopen() behavior.
On AIX, the buildtime searchpath is stored in the executable.
    as "loader header information".
    The command /usr/bin/dump -H extracts this info.
    Prefix searched libraries with LD_LIBRARY_PATH (preferred),
    or LIBPATH if defined. These paths are appended to the paths
    to libraries the python executable is linked with.
    This mimics AIX dlopen() behavior.
On AIX the buildtime searchpath is stored in the executable . as loader header information . The command / usr / bin / dump - H extracts this info . Prefix searched libraries with LD_LIBRARY_PATH ( preferred ) or LIBPATH if defined . These paths are appended to the paths to libraries the python executable is linked with . This mimics AIX dlopen () behavior .
def get_libpaths():
    """
    On AIX, the buildtime searchpath is stored in the executable.
    as "loader header information".
    The command /usr/bin/dump -H extracts this info.
    Prefix searched libraries with LD_LIBRARY_PATH (preferred),
    or LIBPATH if defined. These paths are appended to the paths
    to libraries the python executable is linked with.
    This mimics AIX dlopen() behavior.
    """
    libpaths = environ.get("LD_LIBRARY_PATH")
    if libpaths is None:
        libpaths = environ.get("LIBPATH")
    if libpaths is None:
        libpaths = []
    else:
        libpaths = libpaths.split(":")
    objects = get_ld_headers(executable)
    for (_, lines) in objects:
        for line in lines:
            # the second (optional) argument is PATH if it includes a /
            path = line.split()[1]
            if "/" in path:
                libpaths.extend(path.split(":"))
    return libpaths
def get_libpaths ( ) : libpaths = environ . get ( "LD_LIBRARY_PATH" ) if libpaths is None : libpaths = environ . get ( "LIBPATH" ) if libpaths is None : libpaths = [ ] else : libpaths = libpaths . split ( ":" ) objects = get_ld_headers ( executable ) for ( _ , lines ) in objects : for line in lines : # the second (optional) argument is PATH if it includes a / path = line . split ( ) [ 1 ] if "/" in path : libpaths . extend ( path . split ( ":" ) ) return libpaths