mantegazza at ill.fr
Wed Mar 16 01:36:56 CST 2005
Le Mardi 15 Mars 2005 21:58, Fernando Perez a écrit :
> Well, the prompt _strings_ are customizable. As far as the objects
> themselves, that's a different story: the prompt objects in ipython have
> way too much responsibility for interacting with core functionality, to
> be easily modifiable (esp. _safely_).
> What could be done, if people _really_ need a more dynamic prompt, would
> be to provide a way to re-initialize the prompt string if rc.prompt*
> change. That is feasible, though I won't do it just for the sake of it:
> if anyone can give me a real-world usage case where the current system
> (startup-only access to the prompt string) is too limiting, I'll look
> into it, and think of the cleanest way to expose this functionality to
> users. It's a matter of simply calling again the initialization
> machinery at runtime, and a bit of refactoring of the relevant pieces
> should do the trick.
In our application, we would like to modify the prompt to provide some
status info. We plan to have a system to switch between differents editing
modes, and it would be great to modify the pompt according to the context.
But I also know that our application use ipython in a very special way.
But Ferndando, how do you modify the prompt in the pysh profile ? You do
dynamically modify it according to the current dir, don't you ?
More information about the IPython-user