How to enable and disable Add-ons via Python? Problem
I'm creating an addon loader that allows developers to test their addon in realtime from their external development environment (like eclipse and pydev). Since Blender does not reload all addons automaticly I have to deactivate and reactivate the addon (the refresh button does just update the addon list)
My Idea
I thought I could dig a bit in the Blender sourcecode and use the original code that activates and deactivates an addon. I found several things (in space_userpref.py line 1227 &amp; line 1263) that could do what I want, but it never worked.
I need
the simplest way of de- and reactivating an addon with a known name.
There is an API to manage addons to bypass operators, see addon_utils, this isn't exposed in the API docs because its mainly to manage internal functions. But the API is quite stable now.

addon_utils.enable(
        module_name, default_set=False, persistent=False, handle_error=None)

addon_utils.disable(
        module_name, default_set=False, handle_error=None)


Typically its enough to call:

import addon_utils
addon_utils.enable("my_addon")
addon_utils.disable("my_addon")


Use default_set if you want the value to be stored in the preferences, (although these will have to be saved for the new configuration to be used on restarting Blender).

See the docstrings in the source: 
https://developer.blender.org/diffusion/B/browse/master/release/scripts/modules/addon_utils.py



Since you ask about reloading, see this question on recursive reloading.

https://stackoverflow.com/questions/28101895/reloading-packages-and-their-submodules-recursively-in-python