[IPython-user] Prompt expressions

Ville Vainio vivainio at gmail.com
Thu Jun 15 15:11:54 CDT 2006

On 6/15/06, Walter Dörwald <walter at livinglogic.de> wrote:

> Why not simply pass a prompt type to the generate_prompt hook:
>     0 == input prompt
>     1 == secondary input prompt
>     2 == output prompt
> This might simplify stuff, as input and output prompts might share code.

It would force the user to copy-paste the code for output prompt if he
just wanted to change the input prompt. The users typically only want
to change one or the other but not both.

If instance sharing is required the user can always wire the hooks to
different bound methods of the same object.

Ville Vainio - vivainio.googlepages.com
vainio.blogspot.com - g[mail | talk]='vivainio'

More information about the IPython-user mailing list