Skip to content

load_library cannot load libraries with extensions in the name: (Trac #801) #1399

@numpy-gitbot

Description

@numpy-gitbot

Original ticket http://projects.scipy.org/numpy/ticket/801 on 2008-05-25 by @cournape, assigned to unknown.

#!python
import numpy as np
np.ctypeslib.load_library('libc.so', '/lib)

Raises an error:

---------------------------------------------------------------------------
<type 'exceptions.UnboundLocalError'>     Traceback (most recent call last)

/usr/media/misc/local/stow/<ipython console> in <module>()

/home/david/local/stow/numpy.work/lib/python2.5/site-packages/numpy/ctypeslib.py in load_library(libname, loader_path)
     46             libdir = loader_path
     47 
---> 48         for ln in libname_ext:
     49             try:
     50                 libpath = os.path.join(libdir, ln)

<type 'exceptions.UnboundLocalError'>: local variable 'libname_ext' referenced before assignment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions