Fix colorama import to restrict usage to Windows systems only #112
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello
Recently, I made a fresh installation of Linux Mint (specifically Linux Mint 21.2 Victoria) on my machine, and I installed
pywal16
usingpip3
. Everything was going fine until I tried to execute it with thewal
command, and I and got this error.As the error says, python couldn’t find any function related to the
colorama
library. And after doing some research, I found that #70 introduced some changes to the code for using pywal in windows terminals. I also found that for some reason the library was already installed on my system, but it didn’t include the functionjust_fix_windows_console()
.Code line related:
pywal16/pywal/__main__.py
Lines 18 to 23 in 565b656
I assume the library came preinstalled with the Linux Mint installation or was included in a package I installed using the package manager (apt). In any case, the package is called
python3-colorama
, it seems to be an older version that doesn’t include the function related to the error.So, since the code in pywal is only used for Windows terminals and can cause this error even on other Ubuntu-based distributions, I think it would be better to simply ignore the library on non-windows systems.