[IPython-user] Change prompt during IPython session

Brian Granger ellisonbg.net@gmail....
Mon Jul 27 12:04:12 CDT 2009


This is a bit hackish and won't continue to work in future versions of
IPython, but I think you can get the job done:

In [12]: from IPython import ipapi

In [13]: ip = ipapi.get()

In [14]: ip.IP.shell.outputcache.prompt1
Out[14]: <IPython.Prompts.Prompt1 object at 0x5267b0>

Brian


On Thu, Jun 11, 2009 at 12:50 PM, Norman Saez <norman.saez@gmail.com> wrote:

> Hi All:
> I want to change the behavior of my prompt during the ipython session.
>
> Is it possible do it in a simple way?
>
> something like:
>
> from IPython.Prompts import Prompt1
> prompt = Promtp1(cache, sep='\n', prompt=r'MyPromp [\#]: ', pad_left=True)
>
> Regards!
> n.
> _______________________________________________
> IPython-user mailing list
> IPython-user@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20090727/3b01ca4d/attachment.html 


More information about the IPython-user mailing list