Re:Interfacing Python and C: Advanced “ctypes” Features
by xioxox on Tuesday November 07, 2017 @10:21AM
(#15644054)
I've always thought ctypes a bit of a hack as you get crashes and so on if you're not constantly careful about updating function definitions. It would be much nicer if the compiler could catch the errors, e.g.
Even with cython (please correct me if I'm wrong), the definition needs to be duplicated in the cython script to use it.
[ Parent
| on HN ]
Re:Interfacing Python and C: Advanced “ctypes” Features
by mattip on Tuesday November 07, 2017 @10:31AM
(#15644157)
You are describing cffi http://cffi.readthedocs.io/en/latest
Re:Interfacing Python and C: Advanced “ctypes” Features
by ryanpepper on Tuesday November 07, 2017 @11:06AM
(#15644507)
Boost Python looks somewhat similar to that type of interface too. http://www.boost.org/doc/libs/1_62_0/libs/python/doc/html/tu...