[IPython-dev] Configuration system thoughts
Tue Jul 28 15:28:17 CDT 2009
> IPython. Some attributes (like autocall) can be changed by modifying
> > at runtime and other's (the prompts) can't. What I mean by "can't" is
> > 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
> > IP.outputcache.prompt1. In other cases (like autocall), the relevant
> > IPython code always looks at IP.rc.autocall, so if it is changed,
> > 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.
> Ville M. Vainio
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev