Associated article: Making C Extensions More Pythonic
Tags: Web Development C/C++
Published source code accompanying the article by Andrew Dalke in which he presents PyDaylight, an object-oriented wrapper for Python which provides the low-level interface to the underlying C libraries. Also see CPYTHON.ZIP
Making C Extensions More Pythonic by Andrew Dalke Listing One # Wrapper object to garbage collect the toolkit handle when no longer needed. import dayswig_python class smart_ptr: def __init__(self, handle): self.handle = handle def __del__(self, dt_dealloc = ...