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

Use terminal coloring library #23

Open
benjamin-work opened this issue Jul 28, 2017 · 5 comments
Open

Use terminal coloring library #23

benjamin-work opened this issue Jul 28, 2017 · 5 comments

Comments

@benjamin-work
Copy link
Contributor

Currently, color highlighting is homebrew. We could use a package instead, e.g. https://github.com/tartley/colorama.

Advantages:

  • potentially more features
  • claims to work on Windows
  • no more custom code (Enum doesn't work in Python 2.7)

Disadvantages:

  • one more dependency
@githubnemo
Copy link
Contributor

https://github.com/tartley/colorama seems to be most popular at the moment.

@ottonemo
Copy link
Member

Another option would be https://pypi.python.org/pypi/colored

@ottonemo
Copy link
Member

jupyter notebook and most *NIX terminals support xterm and ansi100 colors (~256) colors. On the other hand, does it make sense to include many colors that are visually indistinguishable from each other?

If we use a library that supports xterm colors (and actually is intelligent enough to evaluate the type of the terminal, e.g. https://github.com/broadinstitute/xtermcolor) we should probably use only colors that differ a few degrees in color space.

@benjamin-work
Copy link
Contributor Author

Can we just add a couple of more colors and be fine with that? I believe that using an external library to add more colors is low priority right now.
One major advantage would be colors in Windows, but since pytorch does not support Windows right now, there is no hurry.

@ottonemo
Copy link
Member

There are issues like https://github.com/timothygebhard/skorch/commit/bdbd96d12bf64a277677984760d9cfce14804425 where the PrintLog might need to switch coloring modes depending on the output destination. A good library could do that for us.

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

No branches or pull requests

3 participants