timofurrer / colorful

Terminal string styling done right, in Python :snake: :tada:
MIT License
525 stars 23 forks source link

Make it work on Windows without colorama calls #28

Closed plastictortoise closed 5 years ago

plastictortoise commented 5 years ago

@timofurrer This doesn't actually update performance, but keeps it the same on windows without additional dependencies. I have tested and can confirm that it works on CMD and PowerShell, just as well as it used to, without colorama, but not as well as Ubuntu.

This works because of this new line, which seems to enable ANSI codes on Windows:

os.system("color")
codecov-io commented 5 years ago

Codecov Report

Merging #28 into master will increase coverage by 0.23%. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #28      +/-   ##
==========================================
+ Coverage   94.04%   94.27%   +0.23%     
==========================================
  Files           7        7              
  Lines         403      402       -1     
==========================================
  Hits          379      379              
+ Misses         24       23       -1
Impacted Files Coverage Δ
colorful/__init__.py 86% <0%> (+1.68%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 919fa6d...9b0ed48. Read the comment docs.

timofurrer commented 5 years ago

Thanks for the contribution :tada:

Can you point me to some documentation for that command?

plastictortoise commented 5 years ago

@timofurrer Here is the documentation, it doesn't mention anything about making ANSI codes work, but it does make them work

timofurrer commented 5 years ago

I think you forgot to attach the link ..

plastictortoise commented 5 years ago

@timofurrer Sorry, here

timofurrer commented 5 years ago

Thanks :tada: