Calling C from Python

Thomas Wouters thomas at xs4all.net
Sun Feb 25 21:31:36 CET 2001


On Sun, Feb 25, 2001 at 02:27:48AM +0000, {-- Rot13 - Hateme wrote:

> I just found this dl module in python manual. I think it
> is need for python2. I am very excited about this function!
> It basically let you dynamically load a library and use it!
> It is a unix module.
> So no wrapper is needed for simple C function access. I 
> waited it for so long!

The 'dl' module has been around for a long time, at least since Python 1.1,
though it might have been named different in that distant a past. Note that
the 'dl' module isn't enabled by default, at least not until the upcoming
Python 2.1. The 'dl' module is also not terribly secure or pythonic: misuse
can easily lead to crashes or weird behaviour. And it won't work on systems
where a pointer, a normal integer and a long integer aren't of the same
size.

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!




More information about the Python-list mailing list