Setting prompt in ipython

Mark Lawrence breamoreboy at yahoo.co.uk
Sun May 24 09:56:01 EDT 2015


On 24/05/2015 14:07, Cecil Westerhof wrote:
> Op Sunday 24 May 2015 14:11 CEST schreef Cecil Westerhof:
>
>> Op Sunday 24 May 2015 13:54 CEST schreef Laura Creighton:
>>
>>> This file supposedly lists what you can customise your ipython
>>> prompt to show. I have not tried this myself.
>>>
>>> http://www.math.uiuc.edu/~gfrancis/illimath/windows/aszgard_mini/movpy-2.0.0-py2.4.4/manuals/IPython/node7.html
>>
>> I will look into it.
>
> I use the following in ~/.ipython/profile_default/startup/00-init.ipy:
>      import time
>
>      %config PromptManager.in_template = r'[{time.strftime("%a, %d %b %T")} \u@\h:\Y1]\nIn [\#]: '
>
> Now I should contemplate what other things would be useful there. ;-)
>

One of the major warts that (i)Python has yet to address via a PEP is 
that it fails dismally when it comes to making the coffee and sandwiches 
to keep you going whilst using it.  Perhaps you'd like to look into this 
issue?  I'm not aware of anything on the bug tracker about it.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence




More information about the Python-list mailing list