Reported on the user list and I confirmed it:
This is with Python 2.7, IPython 0.12.beta (a checkout about an hour ago)
I have these following lines in my ipython_config.py
c.TerminalInteractiveShell.prompt_in1 = 'I\\# '
c.TerminalInteractiveShell.prompt_out = 'O\\# '
But IPython shows prompts in its way:
In : a = 5
In : a
This is definitely a blocker, lots of people customize their prompts so we shouldn't release with this broken.
Thanks for carrying the email report here. Interestingly, changing the lines from /IPython/core/interactiveshell.py as
prompt_in1 = Unicode('I\\# ', config=True)
prompt_out = Unicode('O\\# ', config=True)
does not make any difference. I wonder where else IPython loading these defaults?
Not sure; @takluyver, is it possible that the recent prompt reorg in #507 broke things here? I haven't bisected the problem yet, unfortunately I can't do it right now...
Wasn't this the whole point of the PromptManager? prompts are not traits of the InteractiveShell anymore, they are now traits of the PromptManager:
c.PromptManager.in_template = 'I\\#'
c.PromptManager.out_template = 'O\\#'
The prompt_foo traits of the InteractiveShell shouldn't even exist anymore.
These adds an extra tab before I and O characters. By the way, how to get config object from within IPython?
c = get_config()
Where is this get_config is imported from?
get_config is not imported from anywhere, it's defined interactively, but you can get the config object from the IPython instance with:
c = get_ipython().config
The extra indentation is because the PromptManager right-aligns all prompts to the longest one, so you either have to set PromptManager.justify=False, or make sure that none of the prompts are longer than your input (rewrite is the most likely to be too long).
There seem to be a few issues with the PromptManager. We should probably have had a transition plan in place for before merging a major reorganization of config like this.
Yes, absolutely - there are a number of places this needs to be fixed. Should we leave the InteractiveShell.prompt traits with a deprecation warning, or just remove them and leave users to their own devices?
See #1078 for some fixes. The old traits still exist and work, but point to the new ones shouting about deprecation if you use them. Various references to the old traits in tests, docs, examples, etc. also fixed.
Thanks, I like the approach you took re. deprecation and trait redirection; see my comments in the PR regarding the indentation. I can't work on it tonight, but if you don't get to it or @takluyver doesn't do it, I can also help finish it and recover the behavior we had before. @gsever, we'll only close this issue when that's fully addressed.
The solutions provided by @minrk fixes the I/O prompt customization problem for me. Thanks for the comments on the issue.
I still see in the documentation
which does not work on my pc to the opposite of
is it normal ?
No, this is not normal.
I suspect using get_ipython().config and setting attributes will not work in many cases.
In which file are you doing this ? ipython profile create should create the config files for you.
ipython profile create
Jut to be clear c = get_config() will work only in config files.
c = get_config()
I was doing that in interactive mode.