Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #91169
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Setting prompt in ipython |
| Organization | Decebal Computing |
| Date | 2015-05-24 12:52 +0200 |
| Message-ID | <87siamnt6r.fsf@Equus.decebal.nl> (permalink) |
In bash I have:
\[\e[1m\][\D{%a, %d %b %T} \u@\h:\w]\n$ \[\e[0m\]
which gives me the following prompt:
[Sun, 24 May 12:23:45 cecil@Equus:~]
$
I want to have a similar prompt in ipython. At the moment I have come
to:
%config PromptManager.in_template = r'[\T \u@\h:\Y1]\n\#> '
which gives:
[12:51:32 cecil@Equus:startup]
14>
But how do I get weekday, day-number and short month into my prompt?
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Setting prompt in ipython Cecil Westerhof <Cecil@decebal.nl> - 2015-05-24 12:52 +0200
Re: Setting prompt in ipython Laura Creighton <lac@openend.se> - 2015-05-24 13:54 +0200
Re: Setting prompt in ipython Cecil Westerhof <Cecil@decebal.nl> - 2015-05-24 14:11 +0200
Re: Setting prompt in ipython Cecil Westerhof <Cecil@decebal.nl> - 2015-05-24 15:07 +0200
Re: Setting prompt in ipython Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-24 14:56 +0100
Re: Setting prompt in ipython Chris Angelico <rosuav@gmail.com> - 2015-05-25 00:02 +1000
csiph-web