Archive for the ‘code’ Category

pmc(3) python module

Friday, July 13th, 2007

pmc(3) c functions are not callable from python scripts, so I use the module ezpyinline.py `pkg_add – r py24-ezpyinline` that precompile c functions but there is not preprocess, so I use `gcc – E /usr/src/lib/libpmc/libpmc.c > freebsdpmc.py` and add python code around this.

A main() function is called if freebsdpmc.py is fired as a script.

I know others are working the hard way to make the same module, with docstrings etc.

mprevot@