[IPython-user] namespace question

belinda thom bthom at cs.hmc.edu
Fri Dec 29 15:22:35 CST 2006


Hi,

I've been using ipython for about 3 weeks now and have some questions  
about what data underlies the who and dir commands.

For instance, when I run ipython -pylab, and I run:

   %who

It says:

   interactive namespace is empty

yet when I do

   dir()

it lists all the matplotlib functions (e.g. Annotation, ArrayType,  
<snip>, zeros) I'd expect (as well is ipython's __IP, _i, ... etc).

I'm fairly new to python, but would have expected "-pylab" to have  
behaved like:

   from pylab import *

Note that when I start ipython w/o the -pylab flag and then do:

   from pylab import *

then

   %who

gives me the whole list (e.g. Annotation, <snip>, zeros).

I'd appreciate some feedback so I can have a mental model of what is  
going on under the hood.

Thanks,

--b


More information about the IPython-user mailing list