ipython/ipython — pull request #2462 by takluyver (2012-10-02 21:36:40+00:00)
Title: Track which extensions are loaded

As discussed on the mailing list, extensions should track whether they are loaded per-shell, not per-process. For now, this still leaves it up to extensions what they do if the same shell attempts to load them a second time.

We could easily adjust that so that the shell will only load them once. If you try `%load_ext` with an already loaded extension, there are several possible behaviours we could implement:

- It tells the user "The 'foo' extension is already loaded. To reload it, use %reload_ext foo".
- It reloads the extension, with or without saying anything. We could optionally remove `%reload_ext` in this case.

There could also be a flag to force loading an extension, but it's not clear how this would differ from the current `%reload_ext`.