Sleuthing in Cython: Wrapping and Debugging Legacy C Libraries for Python
Cython, an optimizing static compiler for Python, provides an accessible way to expose legacy C/C++ programs to Python users with minimal background knowledge. However, once initial setup is complete, debugging issues in both the build and runtime can be challenging. The underlying C library might obscure problems in memory management, and the lack of "training wheels" compared to Python can result in system errors, like segfaults or obscure error codes that are difficult to debug. This session explores the tools and workflows essential for working with Cython, identifying common errors, and presenting lessons learned from wrapping a geometric triangulation C library for using with Python via Cython.