musicbrainz/picard — pull request #117 by mwiencek (2013-06-09 06:23:25+00:00)
Title: Make config and log importable

To access Picard's configuration or logging methods, we currently have to either inherit from QObject even when it's not otherwise necessary (ugly), or import QtCore and reference ```QtCore.QObject.config``` (weird and verbose). There are also many places where we're passing around references to the config/log objects just to avoid having to do either of those things.

I think it'd be much simpler to make these proper modules, allowing code like this:
```
from picard import config, log
log.debug(config.setting["foo"])
```

This isn't just about code style, though - and oft-requested improvement is decoupling some of Picard's internals from Qt, and this is a small step towards that.

Ideally, I'd like something similar to happen with ```self.tagger``` and ```self.tagger.xmlws```, but those are larger goals, and I'm not even sure if the first one is practical right now. For ```self.tagger.xmlws```, what I'd do is remove the ```XmlWebService``` class and move all of its methods to the module namespace.

Discussion about any of this is welcome, even if they're just random ideas. :)