8

IPython has this new feature that reformats my prompt. Unfortunately, it is really buggy, so I want to disable it. I managed to do it when starting IPython from the command line by adding the following line in my ipython_config.py:

c.TerminalInteractiveShell.autoformatter = None

However, it does not work when I run it from a python script. I start IPython from my script the following way:

c = traitlets.config.get_config()
c.InteractiveShellEmbed.colors = "Linux"
c.TerminalInteractiveShell.autoformatter = None
c.InteractiveShellEmbed.loop_runner = lambda coro: loop.run_until_complete(coro)
IPython.embed(display_banner='', using='asyncio', config=c)

If I change the colors value, the colors change accordingly, so the configuration itself works. However, no matter what I do with autoformatter, IPython autoformats my code regardless. What am I doing wrong?

1 Answer 1

1

Apparently, the answer is:

c.InteractiveShellEmbed.autoformatter = None
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.