Top "Python-c-api" questions

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

How to pass an array from C to an embedded python script

I am running to some problems and would like some help. I have a piece code, which is used to …

python embedding python-c-api
Calling python method from C++ (or C) callback

I am trying to call methods in a python class from C++. The C++ method from which this is called …

c++ python c callback python-c-api
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
Passing a C pointer around with the Python/C API

I'm new to the Python/C API ... I'm trying to add new functionality to my C program, wherein I can …

python python-c-api
Method without return value in python c extension module

I'm trying to create a script in python that sends data through a parallel port. I'm creating my own module …

python c python-c-api parallel-port python-extensions
Is it possible to modify PYTHONPATH at runtime?

I have a C++ application dynamically linked to the Python interpreter. I want to be able to import python modules …

c++ python boost-python python-c-api python-embedding
.so module doesnt import in python: dynamic module does not define init function

I am trying to write a python wrapper for a C function. After writing all the code, and getting it …

c++ python c python-c-api python-extensions
Multithreading with Python and C api

I have a C++ program that uses the C api to use a Python library of mine. Both the Python …

python c++ multithreading python-c-api
"AttributeError: 'module' object has no attribute 'argv'" when using Python.h

When messing around with Python.h I got this error: AttributeError: 'module' object has no attribute 'argv' C++ code: #include "…

python c++ python-c-api python-embedding