rewrite pyconfig.py for wrap functions into class