environment/lib/python2.7/site-packages/IPython/core/extensions.py
def load_extension(self, module_str):
        """Load an IPython extension by its module name.

        If :func:`load_ipython_extension` returns anything, this function
        will return that object.
        """
        from IPython.utils.syspathcontext import prepended_to_syspath

        if module_str not in sys.modules:
            with prepended_to_syspath(self.ipython_extension_dir):
                __import__(module_str)
        mod = sys.modules[module_str]
        return self._call_load_ipython_extension(mod)
def load_extension(self, module_str):
        """Load an IPython extension by its module name.

        If :func:`load_ipython_extension` returns anything, this function
        will return that object.
        """
        from IPython.utils.syspathcontext import prepended_to_syspath

        if module_str not in sys.modules:
            with prepended_to_syspath(self.ipython_extension_dir):
                __import__(module_str)
        mod = sys.modules[module_str]
        return self._call_load_ipython_extension(mod)
Load an IPython extension by its module name.

        If :func:`load_ipython_extension` returns anything, this function
        will return that object.