From 878d5e9c1ebaa20c9eb07c865293dd500924f321 2013-06-27 18:13:46 From: Fernando Perez Date: 2013-06-27 18:13:46 Subject: [PATCH] Add shim module to allow flattening of namespace. --- diff --git a/IPython/frontend.py b/IPython/frontend.py new file mode 100644 index 0000000..56edcfb --- /dev/null +++ b/IPython/frontend.py @@ -0,0 +1,11 @@ +import sys +import types + + +class ShimModule(types.ModuleType): + + def __getattribute__(self, key): + exec 'from IPython import %s' % key + return eval(key) + +sys.modules['IPython.frontend'] = ShimModule('frontend')