[IPython-user] reducing function visibility in pylab
bthom at cs.hmc.edu
Sun Dec 31 01:42:01 CST 2006
Is there a way to run w/the pylab flag but NOT have a pile of
functions (e.g. plot, axis, ...) show up in the namespace?
What I'd really like is to be able to start in pylab mode (so the
threading stuff is set up), and then have two modules to show up (in
such a way that %who can print their names). I'd also like for dir()
to return very little (not the slew of functions pylab creates).
I get half of what I want by doing:
In : import numpy as N
In : import pylab as P
In : who
But then I've not started in the pylab mode needed for interactive
I've read up on %who a bit more in the manual and now realize that
having %who not show modules imported thru config files was
intentional. However, I can imagine situations (e.g. the classroom)
where an instructor wants to control how students access things and
wishes to have them use %who as the "nice interface". In this case,
I'd want os to show up as O, sys to show up as S, N, and P to be listed.
As always, thanks,
More information about the IPython-user