Latest recipes tagged "cpp" Code RecipesC struct decorator (Python) 2009-05-02T11:27:22-07:00geremy condra <p style="color: grey"> Python recipe 576734 by <a href="/recipes/users/4170000/">geremy condra</a> (<a href="/recipes/tags/cpp/">cpp</a>, <a href="/recipes/tags/decorator/">decorator</a>, <a href="/recipes/tags/struct/">struct</a>). Revision 3. </p> <p>Like my earlier <a href="">C function decorator</a>, this recipe is designed to make it easier to interact with C by removing some of the boilerplate code from defining C structs in Python.</p> C function decorator (Python) 2009-04-29T23:55:03-07:00geremy condra <p style="color: grey"> Python recipe 576731 by <a href="/recipes/users/4170000/">geremy condra</a> (<a href="/recipes/tags/cpp/">cpp</a>, <a href="/recipes/tags/ctypes/">ctypes</a>, <a href="/recipes/tags/decorator/">decorator</a>, <a href="/recipes/tags/function/">function</a>). Revision 6. </p> <p>This recipe provides an easy-to-use, decorator-based solution to the problem of using functions from other languages, especially C, in Python. It takes advantage of Python's new annotations to provide simple type checking and automatic conversion. If you like it, you may also want to check out my <a href="">C structure decorator</a></p>