[SciPy-dev] Is it ok to depend on ctypes for scipy code ?

Robert Kern robert.kern@gmail....
Wed Jun 13 22:02:55 CDT 2007

David Cournapeau wrote:
> Robert Kern wrote:
>> The linking process on Windows requires an extension module to actually have the
>> initfoo function.
> Don't tell me this is again windows doing things totally differently 
> than everybody else for the sake of being incompatible :)

<shrug> Dynamic linking is inherently platform specific. Everyone does it
differently. It just happens that Windows' choices gets in the way in this
particular instance.

> On windows, 
> the major problem I have with ctypes for pyaudiolab is detecting the 
> library, because numpy.distutils does not find the dll if the .lib is 
> not there (the library I depend on, sndfile, is compiled by mingw by the 
> main author).

Of course, that's not a problem with ctypes, nor even numpy.distutils. It's just
an unsupported use of numpy.distutils.

> Of course, I do not pretend there is no problem, I just don't understand it.

I think you may be reading my statement out of context. Andrew asked about
building shared libraries for ctypes' use by abusing distutils to build a fake
extension module from it. My response was providing the reason why that doesn't
work in general.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

More information about the Scipy-dev mailing list