Conversation

Just completed writing my first ever C-based Python extension. MUUUUUCH better experience than writing the same exact extension, but for PHP. Like, I'm in wholly different universe.
1
6
Replying to
CFFI is the easiest and nicest way to interface with C from Python. Strongly recommend that over CPython extensions unless you have special requirements like needing to do work without the CPython GIL held. It's probably a bad choice of language when that's relevant though.
1
Replying to
It fully understands C89 macros so that should all work fine without even needing any wrapper code. You can easily make C wrapper code without needing to deal with building it, etc. yourself but you usually don't need to do that.
1
1
Replying to
I think after I've hit a few crucial milestones at ${DAYJOB}, I'll revisit CFFI. Since the module's already written at this point, there's not much need to redo the work. Thanks for the suggestion! I'll take a deeper look into CFFI for our next modules.
1