Calling C from Python

Thomas Wouters thomas at
Sun Feb 25 15:31:36 EST 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

Thomas Wouters <thomas at>

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

More information about the Python-list mailing list