do-release-upgrade broke my
ipython classic mode. The
ipython package was upgraded, and apparently the configuration parser
In bash, I want colors to help me find the beginning and end of output —
see this bug
others agreeing with me that the derogatory comment about "focus should
be on the output, not on the prompt" in the skeleton
.bashrc is is
retared, but I diverge — in ipython, I just want to see the nice
blocks that I'm used to and no extra spaces. I.e.: classic mode.
Previously, one could set
classic 1 in
~/.ipythonrc. Since the
upgrade, one should be able to fix it by editing
However, the fixes that the pages on google propose, do not work:
c.TerminalIPythonApp.classic = True
The following does work:
# Force classic mode! c = get_config() c.InteractiveShell.cache_size = 0 c.PlainTextFormatter.pprint = False c.PromptManager.in_template = '>>> ' c.PromptManager.in2_template = '... ' c.PromptManager.out_template = '' c.InteractiveShell.separate_in = '' c.InteractiveShell.separate_out = '' c.InteractiveShell.separate_out2 = '' c.InteractiveShell.colors = 'NoColor' c.InteractiveShell.xmode = 'Plain' # c.InteractiveShell.confirm_exit = False #c.IPythonTerminalApp.display_banner = False
These settings are taken from the source where the
--classic option is
defined, so they should be ok.
django shell does not show the right classic settings, you're
probably running an old version.
Here, in the 1.3 branch and higher, the code looks like this:
def ipython(self): try: from IPython import embed embed()
Previously that was this, and that doesn't work, unless you pass default
def ipython(self): try: from IPython.frontend.terminal.embed import TerminalInteractiveShell shell = TerminalInteractiveShell() shell.mainloop()
Just upgrade your django and be done.