Native python extension module in C++ for reading numbers