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

Formatting on windows Powershell very off #5

Closed
EinAeffchen opened this issue Dec 25, 2018 · 9 comments
Closed

Formatting on windows Powershell very off #5

EinAeffchen opened this issue Dec 25, 2018 · 9 comments
Labels
bug Something isn't working

Comments

@EinAeffchen
Copy link

�[37;1m[�[92;1m+�[37;1m]�[92;1m Unsplash:�[0m https://unsplash.com/@user
�[1;92m[�[0m�[1;77m*�[0m�[1;92m] Saved: �[37;1mUser.txt�[0m

That's how all the lines look like in windows powershell. I guess the print is designed for a linux platform?

@MrGreenTea
Copy link

Yeah these are ANSI codes for colored output. I've had success with https://github.com/tartley/colorama

@sdushantha sdushantha added the bug Something isn't working label Dec 26, 2018
@sdushantha
Copy link
Member

I have heard that Hue is very good.
Which one should we use? Hue or Colorama?

@Calinou
Copy link

Calinou commented Dec 26, 2018

Hue's README says:

Note: Windows versions below windows 10 do not support ANSI escape sequences so the colors will not be printed in command prompt.

Colorama can also be used to wrap other color libraries on Windows (it will do nothing on other platforms), so you can use both, actually. However, this will only work if you can force Hue to print colors on old Windows versions.

@ghost
Copy link

ghost commented Dec 31, 2018

Would recommend Colorama 11/10. Actually a very simple fix if it is used.

[Colorama] has the happy side-effect that existing applications or libraries which use ANSI sequences to produce colored output on Linux or Macs can now also work on Windows, simply by calling colorama.init()

Though, I have heard that Colorama is a tad bit slower than Hue.

@raphuchur
Copy link

hue works perfectly
run pip install huepy
add from huepy import * to the importing part of the sherlock.py file

@jcs090218
Copy link
Contributor

I personally think Colorama's style are better than Hue's style. Below are the comparison of two libraries.

Hue

from hue import *
print red('This string is red')

Colorama

from colorama import Fore
print Fore.RED + 'This string is red'

The point here, if use Hue, the code might end up like print(red('This string is red')). On the other hand, if we use Colorama the code likeliest be like print(Fore.RED + 'This string is red'). Unless the code are not going to change to something more readable, I reckon this would not matter.

@nareddyt
Copy link
Contributor

nareddyt commented Jan 4, 2019

Closed via #71

@nareddyt nareddyt closed this as completed Jan 4, 2019
@TheYahya
Copy link
Member

TheYahya commented Jan 5, 2019

Looks like there's still issues in some shells

@TheYahya TheYahya reopened this Jan 5, 2019
@sdushantha
Copy link
Member

Closing this issue as it has been fixed. There is also an option not not have colors which was introduced in #463

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants