[IPython-dev] Configuration system thoughts

Brian Granger ellisonbg.net@gmail....
Tue Jul 28 15:28:17 CDT 2009


> IPython.  Some attributes (like autocall) can be changed by modifying
> IP.rc
> > at runtime and other's (the prompts) can't.  What I mean by "can't" is
> that
> > you can change IP.rc, but IPython's behavior won't change.  An example of
> > this is that to get the prompts to change at runtime you need to  hack
> into
> > IP.outputcache.prompt1.  In other cases (like autocall), the relevant
> > IPython code always looks at IP.rc.autocall, so if it is changed,
> IPython's
> > behavior changes.
>
> Many of these problems could be fixed by fixing stuff like prompts to
> actually look at the config variable every time. Since it needs some
> "computation" every time, you can remember the value of previous
> invocation and do the calculation only if it has changed.
>

Yes, definitely.  However, the current approach of having IP.rc hold the
runtime value for *everything* means that everything is tightly coupled to
IP.  That is what we have to break.  My vision is that all objects will hold
their own runtime state.  Thus the prompt objects will hold the values of
the prompt strings.  We will then have an API that allows other parts of the
code base to modify those values.  But all of that will be completey
independent of IP.

Brian

>
> --
> Ville M. Vainio
> http://tinyurl.com/vainio
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20090728/69a0efd8/attachment-0002.html 


More information about the IPython-dev mailing list