[IPython-User] import_all('module') in 0.11

Fernando Perez fperez.net@gmail....
Fri Aug 12 21:42:07 CDT 2011

Hi Jonathan,

On Mon, Aug 8, 2011 at 8:54 AM, Jonathan Stickel <jjstickel@vcn.com> wrote:
> Previously, I could use the suggested "import_all('module')" in
> ipy_user_conf.py to import everything in a module into an ipython
> session.  Doing it this way also provided the significant advantage of
> not cluttering the namespace, so that "%whos" did not show everything
> that was imported via the config file.
> Is there a way to do this in 0.11?

Not quite, you can load whatever you want by putting in your config
file for example:

c.InteractiveShellApp.exec_lines = [ 'from sys import *',

Unfortunately, the checking of the user namespace that is done to
filter out what %who shows is done prior to this code execution, so in
this example, %who would annoyingly list all of the names in sys.

In summary, you can get the imports, but not the %who filtering,
that's a regression.  I've filed a ticket so we can track this issue:




More information about the IPython-User mailing list