On 03/29/2017 03:49 AM, Wouter van der Beek (wovander) wrote: > Yeah I would really like that :). > > Kind Regards, > Wouter > > -----Original Message----- > From: iotivity-dev-bounces at lists.iotivity.org [mailto:iotivity-dev-bounces > at lists.iotivity.org] On Behalf Of Mats Wichmann > Sent: 28 March 2017 23:00 > To: Morrow, Joseph L <joseph.l.morrow at intel.com>; iotivity-dev at > lists.iotivity.org > Subject: Re: [dev] Has anyone wrapped IoTivity with Python yet? > > On 03/28/2017 03:59 PM, Morrow, Joseph L wrote: >> Any Python wrappers for IoTivity out there? > > I've been thinking about it, but haven't heard about one.
Should someone wish to pursue such a project, there are at least two big questions. The first would be... what to wrap? The C libraries? More? Add-on projects? The second would be how: Python has some help for calling into a binary library - in fact, there are a large number of different schemes, with advantages and disadvantages to each apparently. I've only been around one such project, which used Swig to generate a wrapper and it worked okay, though various people (including one who commented on this concept in iotivity context - maybe on this list) that the results were never of very high quality. My limited Swig experience is over a decade old, sadly; I recall the work was in the interface description file, and it was not pretty. There's also ctypes, writing an extension module yourself, or using Cython (which with a couple of other minor approaches, has you write Python that is compiled into C - wouldn't be my first choice for an "ease of use" binding, as opposed to one used for product-level code where it might be the choice). There's also a boost-python project I don't really know anything about.
