I am looking for the same. C code is fine. I can convert it to Python