Open WayneKeenan opened 7 years ago
Hi Wayne,
Thanks for your interest - I haven't actually tried this, as you might be able to tell from the lack of progress on this, I haven't found a great deal of time to work on this recently, but moving to ctypes could make maintenance much more straightfoward. I also like the look of pybind11 (as opposed to boost::python), but Python could make life much easier.
I'll try out the code you've attached when I get time.
Matt
If someone is going to work on this I’d suggest to directly use cffi instead of ctypes since it will then automatically be compatible with pypy (and cffi is nicer to work with anyway).
Hi,
I submitted a pull request that gets this working for me on Python3, but I wondered...
How about porting this to pure Python (i.e. ctypes) ?
But before I jump off into the abyss I wondered if you had considered it or tried it and then found it wasn't actually doable ?
For example, this is something flakey I have so far: https://github.com/TheCellule/python-bleson/blob/546b5d907b0a4495362843237c947f3e8f89f0bc/sandpit/test_macos_xpc_ctypes_observer.py
I have very big doubts as to wether or not I can get ObjC blocks and ctypes callbacks to work at all.
Any thoughts or experiences you have would be greatly appreciated.
Thanks Wayne