ctypes
Call functions in C shared libraries (.dll / .so) directly from Python.
Advanced
import ctypes
libc = ctypes.CDLL(None) # Linux/macOS: the C library
libc.printf(b"hello from C\n")
Used to talk to vendor SDKs for instruments and USB devices.
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.