0

I edited ipython_qtconsole_config.py to include a timestamp:

import datetime
c = get_config()
c.PromptManager.in_template = '%s In [\\#]: ' % datetime.datetime.now().strftime("%H:%M:%S")

When I type config PromptManager in the shell I see that my change was made, however no timestamp is displayed. How can I fix this issue?

sodd
  • 12,482
  • 3
  • 54
  • 62
chalpert
  • 252
  • 1
  • 8

1 Answers1

0

The qtconsole prompt doesn't support most of what the regular IPython prompt does (which is an open issue). The configurable is also different.

The default value:

c.IPythonWidget.in_prompt = 'In [<span class="in-prompt-number">%i</span>]: '

You can change it with:

c.IPythonWidget.in_prompt = '<b><i>My Prompt </i>[%i]: </b>'

When the issue is addressed, it should behave exactly as you expect.

minrk
  • 37,545
  • 9
  • 92
  • 87
  • Thanks, that works. Unfortunately IPython only displays the time at which it starts up and does not update the timestamp with each new line. The solution here doesn't seem to work http://stackoverflow.com/questions/3879752/is-there-a-way-to-get-a-local-timestamp-in-my-ipython-prompt/3902879 – chalpert May 06 '13 at 22:28