SoCo/SoCo — pull request #2 by stefankoegl (2013-03-16 15:37:32+00:00)
Title: Plugin Interface

Another proposal for a plugin interface. This is basically what I proposed in rahims/SoCo#41.

A short rundown:
* plugins subclass `soco.plugins.SoCoPlugin` and override the name property
* `SoCo` has additional methods `send_command()` and `parse_error()` that just call the corresponding dunder methods. They can be used to add specific guards, logging, etc that are just needed when called from external
* plugins can be imported and instantiated as normal objects
* `SoCoPlugin.from_name()` can create an instance from a module name (eg from a config file)
* For better structure, I've split up soco.py into a soco module. All existing imports continue to work, though!
* `soco.plugins.example.ExamplePlugin` contains an example plugin implementatio, examples/plugins/socoplugins.py` example usage.

Please let me know what you think about the interface. I'll provide proper documentation before we merge those change in.