About 829,000 results
Open links in new tab
  1. python - ctypes - Beginner - Stack Overflow

    I have the task of "wrapping" a c library into a python class. The docs are incredibly vague on this matter. It seems they expect only advanced python users would implement …

  2. python - What is the difference between ctypes.CDLL () and …

    Apr 11, 2021 · Everything is well explained in [Python.Docs]: ctypes - A foreign function library for Python: class ctypes. CDLL (name, mode=DEFAULT_MODE, handle=None, …

  3. How to return array from C++ function to Python using ctypes

    Feb 15, 2013 · I am using ctypes to implement a C++ function in Python. The C++ function should return a pointer to an array. Unfortunately I haven't figured out, how to access the array in …

  4. How do I convert a Python list into a C array by using ctypes?

    How do I convert a Python list into a C array by using ctypes? Asked 15 years, 1 month ago Modified 3 years, 6 months ago Viewed 84k times

  5. Python ctypes definition for c struct - Stack Overflow

    Implementing the ctypes struct as suggested by Roland didn't work - the returned values were garbage, I never worked out why as I pursued a python based implementation of lilbil's answer.

  6. python - How to use C++ classes with ctypes? - Stack Overflow

    I'm just getting started with ctypes and would like to use a C++ class that I have exported in a dll file from within python using ctypes. So lets say my C++ code looks something like this: class

  7. python - How to pack and unpack using ctypes (Structure <-> str ...

    If I use struct to define a binary structure, the struct has 2 symmetrical methods for serialization and deserialization (pack and unpack) but it seems ctypes doesn't have a straightforward way …

  8. python - ctypes "crashes" while trying to return pointer - Stack …

    Sep 11, 2024 · I am currently trying to get a pointer element back from .dll library (compiled using cygwin and gcc - Source code is in C). But when executing the C function inside of python. …

  9. c - Python Ctypes - loading dll throws OSError: [WinError 193] %1 …

    Aug 1, 2019 · I have tried to run an exemple of a python code that gets a function from a library using ctypes. The exemple can be found here. I followed the instruction and beside one minor …

  10. python - ctypes and passing a by reference to a function - Stack …

    Sep 23, 2011 · See the ctypes tutorial section on pointers for more information. I'm assuming you've created ctypes proxies for the other arguments as well. If dev requires a string, for …