Top "Python-c-api" questions

API used by C and C++ programmers who want to write extension modules or embed Python.

How to create a generator/iterator with the Python C API?

How do I replicate the following Python code with the Python C API? class Sequence(): def __init__(self, max): self.…

python c iterator generator python-c-api
PyEval_InitThreads in Python 3: How/when to call it? (the saga continues ad nauseam)

Basically there seems to be massive confusion/ambiguity over when exactly PyEval_InitThreads() is supposed to be called, and what …

python python-3.x python-c-api python-3.2 python-c-extension
Embedding Python into C - importing modules

I am having problems using the Embedded Python for C as per the Documentation - Whenever I try using imported …

python c python-c-api python-embedding
How does PyArg_ParseTupleAndKeywords work?

I've been trying to learn how to write C-extensions for Python and want to be sure I understand how PyArg_…

python python-c-api python-c-extension