[IPython-user] pylab and embedded IPython
vivainio at gmail.com
Thu Apr 13 04:07:58 CDT 2006
On 4/12/06, Michael Foord <fuzzyman at voidspace.org.uk> wrote:
> * Being able to set the ipythondir (sending ['-ipythondir', libdir] as
> the first argument)
> * Being able to set a banner
> * Running in a namespace (pass in a locals and globals dictinary)
Banner should be easy, see ipy_profile_sh.py for an example.
> Looking in Shell.py, when '-pylab' is passed in, the class returned by
> ``_matplotlib_shell_class`` is used. I can't see how to pass in a
> namespace here - ``user_global_ns`` and ``user_ns`` don't seem to do it.
Line 132 of Shell.py worries me a bit:
# FIXME. Passing user_ns breaks namespace handling.
#self.IP = make_IPython(argv,user_ns=__main__.__dict__)
self.IP = make_IPython(argv,rc_override=rc_override,embedded=True)
Perhaps Fernando could enlighten us on this?
> Is it possible to expose this functionality (or even some of it) ?
I'm down with exposing the functionality and can take a look at it
(but please have a look at it yourself also, patches appreciated).
Most configuration should be doable by executing IPython.ipapi
commands (see files in UserConfig) after instantiating the shell, but
the namespace thing is more problematic.
Ville Vainio - vivainio.googlepages.com
vainio.blogspot.com - g[mail | talk]='vivainio'
More information about the IPython-user