For reasons explained in this Celery-specific question, I want to be able to load or change IPython profiles from within the interactive shell via a magic command or programmatically. I cannot find any way to set the profile ( get_ipython().profile only seems to retrieve the current one).

I'm using IPython 2.3.1 .