Added ENABLE_PYTHON #ifdef where needed.