eyed3 on windows doesn't detect the TERM as not supporting color

Issue #92 resolved
Unknown Name
created an issue

Example:

E:\Media\Music\Billy Joel\Glass Houses>python -m eyed3.main "01. You May Be Right.mp3"
[1m[32m01. You May Be Right.mp3[39m[22m     [32m[ 3.92 MB ][39m
-------------------------------------------------------------------------------
[1mTime: [22m04:17    MPEG1, Layer III        [ 128 kb/s @ 44100 Hz - Stereo ]
-------------------------------------------------------------------------------
ID3 v2.3:
[1mtitle[22m: You May Be Right
[1martist[22m: Billy Joel
[1malbum[22m: Glass Houses

With --no-color:

E:\Media\Music\Billy Joel\Glass Houses>python -m eyed3.main --no-color "01. You May Be Right.mp3"
01. You May Be Right.mp3        [ 3.92 MB ]
-------------------------------------------------------------------------------
Time: 04:17     MPEG1, Layer III        [ 128 kb/s @ 44100 Hz - Stereo ]
-------------------------------------------------------------------------------
ID3 v2.3:
title: You May Be Right
artist: Billy Joel
album: Glass Houses

Since there is no environment variable TERM on Windows your check in AnsiCodes.init() is defaulting to True. You might want to add a check like:

if "OS" in os.environ and os.environ["OS"] == "Windows_NT":
    AnsiCodes._USE_ANSI = False

-Bearded Gnome

Comments (3)

  1. Log in to comment