Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

embed C in python

Tags:

python

c

I need to find some way to embed a C library and C code in python. I have looked all over and found a lot of embedding python in C examples but not very many visa versa. And I need to make sure I'm embedding the C, and not just re-wrapping it.

Thanks.

like image 901
Brooks McMillin Avatar asked May 03 '26 10:05

Brooks McMillin


1 Answers

Extending Python with C is straightforward, but not brief. There is an official tutorial titled Extending Python with C or C++ available here.

like image 92
rob05c Avatar answered May 05 '26 23:05

rob05c



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!