Colored prompt for embed()
See original GitHub issueimport IPython; IPython.embed()
has no colors for me. https://github.com/ipython/ipython/issues/9450 is related but old.
IPython 7.1.1 Python 3.6.6 Ubuntu 18.04
Issue Analytics
- State:
- Created 5 years ago
- Reactions:14
- Comments:10
Top Results From Across the Web
Bash/Prompt customization - ArchWiki
Bash has several prompts which can be customized to increase productivity, ... 2.3 ANSI escape sequences; 2.4 Embedding commands ...
Read more >How to Customize (and Colorize) Your Bash Prompt
Feel free to experiment with different special characters and commands to assemble your ideal command prompt. How to Add Colors to Your Bash ......
Read more >IPython.embed() does not use terminal colors - Stack Overflow
I will frequently use IPython.embed() to examine the state of running code. In earlier versions of IPython, it correctly determines color ...
Read more >What color codes can I use in my Bash PS1 prompt?
(And do not embed variables inside printf statements, use %s .) – alexia. May 4, 2014 at 15:08. 2.
Read more >How to colorize the Powershell prompt? - Super User
More advanced colours. If you aren't happy with the basic 16-colour palette, you can use full 24-bit colours with the form:
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For anyone who stumbles across this, I was able to fix it just like this:
Also here.
IPython 7.2.0 Python 3.6.6 RHEL 7.4 / Mac OS 10.14
It seems that this issue originates from #11265.
https://github.com/ipython/ipython/blob/0acd580fce7192044a6f846dd09d31d498018347/IPython/terminal/embed.py#L369-L371
Why is the default now to implicitly assign colors to ‘NoColor’?
For a dirty fix, I set
which is obviously abusing code, and uses the
IPython.core.async_helpers._AsyncIORunner
instead ofIPython.core.async_helpers._pseudo_sync_runner
. For my particular case I’m not sure what unintended side effects that may have.