pythonconfig: create a config object

this fixes getting config from c++ code,
broken since 578dc6957156b2e4225f9310236b39cca315692e