Importing libs on Windows?

Dave Angel davea at
Fri Aug 13 11:23:31 CEST 2010

Brian Salter wrote:
> It appears that every example is calling a dll, and I'm looking to 
> bring in a lib.  Does ctypes work with libs too?
> "Gary Herron" <gherron at> wrote in message 
> news:mailman.2044.1281656800.1673.python-list at
>> On 08/12/2010 04:09 PM, Brian Salter wrote:
>>> I've seen a number of tutorials that describe how to bring in a dll 
>>> in python, but does anybody know of a tutorial for how to bring in a 
>>> lib? Is it even possible?
>>> Thanks, in advance!
>> Look at the Python module named ctypes:
>> Gary Herron
A lib file is not executable.  It's a *description* of routines and data 
that has to be converted by a linker into actual executable code.  The 
reason it's called a static lib is that once it is converted by the 
linker, the actual executable code resides inside the EXE file.  So an 
application written in C doesn't ship with the lib file either (unless 
of course it's a compiler/linker).

What's your actual goal?


More information about the Python-list mailing list