[IPython-User] %whos doesn't display all variables/modules for some reason?

Piet van Oostrum piet@vanoostrum....
Fri Dec 3 09:04:57 CST 2010


"Benjamin J. Racine" <bjracine@glosten.com> writes:

> I have a start.py file that I do “from start import *”
>
> The contents of this file are as follow:
>
... [snip]

>
> But a %whos command in ipython returns just:
>
> In [18]: whos
>
> Variable   Type        Data/Info
>
> --------------------------------
>
> argparse   module      <module 'argparse' from '<...>e-packages\argparse.pyc'>
>
> glob       function    <function glob at 0x0000000004CDBEB8>
>
> Any ideas as to where I should start poking around?  I am on windows xp64 and using spyder and
> believe therefore ipython 0.10
>

Who(s) only shows variables that were created interactively. I suppose that some of these modules were already imported by the initialization code (for example if you use -pylab numpy will be imported by the initialization) and therefore are not considered to be interactive variables. You can easily check this by starting ipython with and without -pylab, importing numpy and then checking whos.
-- 
Piet van Oostrum <piet@vanoostrum.org>
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
Nu Fair Trade woonartikelen op http://www.zylja.com



More information about the IPython-User mailing list