[python] style, partial python3 compat

- pep8: 4 spaces
- use 'in' instead of has_key for checking dicts
- some fixes for settingsapp
[python] fix settingsapp: use generated var/<acname>/settings.xml