The idea behind this repo is to start building core knowledge on how to extend Python with C or C++. So dont hesitate to be verbose on code comments or README.
Please follow the guideline below when committing examples of C extensions.
- Create new folder under
srcnamed accordingly to the example, i.e.list - Create 1 or 2 subfolders when adequate,
py,c. If this code is done from scratch using PYTHON/C API no need to create thecfolder. If you are rewriting someCsources as an extension, please paste those oncso we can use that as reference when reading. - Create
setup.py - Provide additionals Readme if suitable
One file with the same name as the example you are posting.
llist: simple rewriting of a linked list interface written by me a long time ago.numpy: code from here. Useful whenever the time comes to do some more fancy shit usingarrayobjects.
- As a first step I would suggest this
- More on Reference Counting mainly extensionpatterns
numpynp