Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipython notebook support fo colored output #1185

Closed
RonnyPfannschmidt opened this issue Dec 19, 2018 · 0 comments
Closed

ipython notebook support fo colored output #1185

RonnyPfannschmidt opened this issue Dec 19, 2018 · 0 comments
Assignees

Comments

@RonnyPfannschmidt
Copy link
Contributor

@RonnyPfannschmidt RonnyPfannschmidt commented Dec 19, 2018

hi, currently click strips colors when used in code invoked by ipython notebooks

after a short chat on the ipython notebook channel i learned that a commonly suggested workaround is

click.utils.should_strip_ansi = lambda *k, **kw: False and that a reasonably reliable way to detect such a stream is stream.__class__.__module__.startswith('ipykernel.')

i propose setting up isatty to check this in the exception case (aka no tty attribute as the jupyter streams dont have one

additional help will be needed from someone with a windows system, as to me it is not clear whether its required to alter the stream wrapping that is used on win32

@RonnyPfannschmidt RonnyPfannschmidt self-assigned this Dec 19, 2018
RonnyPfannschmidt added a commit to RonnyPfannschmidt/click that referenced this issue Dec 20, 2018
this currently lacks automated tests and is entirely untested on windows

fixes pallets#1185
RonnyPfannschmidt added a commit to RonnyPfannschmidt/click that referenced this issue Jan 8, 2019
this doesn't support windows since i don't have a system
where i could check/test/automate colorama support

fixes pallets#1185
RonnyPfannschmidt added a commit to RonnyPfannschmidt/click that referenced this issue Jan 15, 2019
this doesn't support windows since i don't have a system
where i could check/test/automate colorama support

fixes pallets#1185
davidism added a commit to RonnyPfannschmidt/click that referenced this issue Jan 15, 2019
This doesn't support Windows since I don't have a system where I could
check/test/automate colorama support.

fixes pallets#1185
@davidism davidism closed this Jan 15, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants