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

Broken coloring when used with tqdm #16

Open
offchan42 opened this issue Oct 29, 2019 · 4 comments
Open

Broken coloring when used with tqdm #16

offchan42 opened this issue Oct 29, 2019 · 4 comments

Comments

@offchan42
Copy link

offchan42 commented Oct 29, 2019

I see that when I do from tqdm import tqdm and then run pp(a_variable)
There is no color for the pp() message anymore. So my work around was to import tqdm as late as possible. Is this problem with snoop or tqdm? How can we fix this?
This happens on Windows 10 command prompt.

tqdm Link: https://github.com/tqdm/tqdm

@alexmojaki
Copy link
Owner

What happens if you uninstall colorama?

@offchan42
Copy link
Author

It seems like uninstalling colorama fixes the issue. What does it mean then?

@alexmojaki
Copy link
Owner

tqdm uses colorama (if it's available) to process ANSI escape codes in Windows. Windows only recently started supporting those escape codes natively. snoop relies on that new ability instead of colorama, which is the traditional solution to the lacking support. colorama was probably stripping the escape codes, although I'm not sure. I'm not on a Windows machine.

@offchan42
Copy link
Author

It seems that I cannot use ipython when I remove colorama.
image
Any workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants