can't import dl module

Just just at xs4all.nl
Fri Oct 3 14:43:57 EDT 2003


In article <mailman.1065200585.445.python-list at python.org>,
 "Steven D. Arnold" <stevena at neosynapse.net> wrote:

> I'm on Mac OS X 10.2.6, using Python 2.3final.  I would like to use the dl
> module to get access to some system calls, in particular kvm_getprocs.
> However, when I try to import dl at the Python command-line, it tells me it
> couldn't find the module.
> 
> It would seem I have to do something special to get dl to build on my
> machine.  Does anyone know what that would be?  Or is there some other
> problem that prevents this from working?
> 
> Alternatively, does anyone know what else I could do to get at those calls?
> Perhaps I could try SWIG, but that seems like a hassle compared to dl.

I've never heard of the "dl" module, and Python definitely come with 
such a module by default. That said, look for ctypes, it sounds like it 
does what you want. By the way, if you used the binary Python.framework 
installer, you should have an app called "PackageManager" in 
/Application/MacPython-2.3. Then use Bob Ippolito's package repository, 
it contains ctypes (see http://www.python.org/packman/). That should 
save you the trouble of having to build ctypes yourself.

Just




More information about the Python-list mailing list