NSLS-II / wishlist

an issue tracker for the big picture
1 stars 0 forks source link

Add date time to ps1 in ipython #15

Closed tacaswell closed 9 years ago

tacaswell commented 9 years ago

Add time stamp so it is easier to sort out what went on when scrolling up later.

danielballan commented 9 years ago

What is ps1? I would Google it, but Google is blocking BNL. Good work, ITD.

danielballan commented 9 years ago

http://ipython.org/ipython-doc/rel-0.13.1/api/generated/IPython.utils.io.html#IPython.utils.io.raw_input_multi

tacaswell commented 9 years ago

ex In [N] 04 13:37 :

tacaswell commented 9 years ago

@cmazzoli

Running the following

%config PromptManager.in_template = '\T In [\\#]: '
%config PromptManager.out_template = '\T Out[\\#]: '

will make your terminal look like this:

10:01:40 In [49]: 1
10:01:42 Out[49]: 1

10:01:42 In [50]: 

10:02:21 In [50]: a = 2

10:02:28 In [51]: 

It is not much more work to customize that timestamp to be truncated, include date / day of week etc.

ericdill commented 9 years ago

@tacaswell is this something that will ultimately end up in a startup script?

tacaswell commented 9 years ago

more-or-less, this should go through the ipython_config.py file not the startup files.

tacaswell commented 9 years ago

attn @cmazzoli again.

@danielballan for documentation.

Closing this as this is an IPython configuration issue.

danielballan commented 9 years ago

http://nsls-ii.github.io/beamline-configuration.html#customizing-the-prompt