[Python] How to access python bool variable from C code?

Discussão em 'Python' iniciado por Stack, Julho 26, 2025.

  1. Stack

    Stack Membro Participativo

    I have been working on extending a Python application using ctypes to call a shared library in C code. I have a boolean variable in Python which I would like to check periodically in an infinite loop in the C code to see if it changes. Is there a way to send the memory address of the python variable to the C function and access the content?

    Thank you in advance!

    Continue reading...

Compartilhe esta Página