ctypes help

Chris Angelico rosuav at gmail.com
Fri Nov 17 18:49:40 EST 2017


On Sat, Nov 18, 2017 at 9:11 AM, Python <python at bladeshadow.org> wrote:
> Hello Pythonistas,
>
> I'm starting to play with ctypes, as I'd like to provide Python
> interfaces to a C/C++ library I have.  For now I'm just messing with a
> very simple piece of code to get things sorted out.  I'm working with
> this example C++ library, which just wraps a call to stat():

I would recommend you look into Cython, which can help you write C
code that links to Python without all the hassle of manually tracking
refcounts etc. (I also recommend using Python 3 instead of Python 2,
but that's a separate point.)

ChrisA



More information about the Python-list mailing list