Top "Python-c-extension" questions

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

Building lxml for Python 2.7 on Windows

I am trying to build lxml for Python 2.7 on Windows 64 bit machine. I couldn't find lxml egg for Python 2.7 version. …

python windows lxml building python-c-extension
Python C extension: Use extension PYD or DLL?

I have a Python extension written in C and I wonder if I should use the file extension DLL or …

python python-c-extension pyd
easy_install fails on error "Couldn't find setup script" after binary upload?

After uploading a binary distribution of my Python C extension with python setup.py bdist upload, easy_install [my-package-name] fails …

python binary easy-install python-c-extension
Extending python with C: Pass a list to PyArg_ParseTuple

I have been trying to get to grips with extending python with C, and so far, based on the documentation, …

python c python-c-api python-c-extension
Embedding Python in C, linking fails with undefined reference to `Py_Initialize'

I am trying to compile the example from the docs https://docs.python.org/2.7/extending/embedding.html and my code …

python c python-c-extension
What is the "correct" way to pass a boolean to a Python C extension?

This is a simple example from the python documentation (http://docs.python.org/extending/extending.html): static PyObject * spam_system(…

python python-c-api python-c-extension
C array to PyArray

I'm writing a Python C-Extension without using Cython. I want to allocate a double array in C, use it in …

python numpy python-c-api python-c-extension
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
"...can't figure out the architecture type of..." problem when compiling Python C-extension with gcc

I just upgraded from Snow Leopard to Lion, and an old python c-extension that I had to update didn't want …

gcc osx-lion python-c-extension
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