Skip to content

Commit

Permalink
Removed colored output in Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Unknown authored and Unknown committed Jul 25, 2017
1 parent e045ca1 commit aec36ed
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
Binary file modified dist/main/base_library.zip
Binary file not shown.
Binary file modified dist/main/main.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions dist/main/main.exe.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<assemblyIdentity name="main" processorArchitecture="amd64" type="win32" version="1.0.0.0"/>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
</application>
</compatibility>
Expand Down
9 changes: 8 additions & 1 deletion the_bot.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import re
import sys
import time
import platform
import requests
import configparser
from termcolor import colored
Expand Down Expand Up @@ -93,7 +94,13 @@ def print_message(self, text, color='magenta'):
:param color: message color
"""
updated_text = '[{0}] {1}: {2}'.format(datetime.now().strftime("%H:%M:%S"), self._bot_name, text)
message = colored(updated_text, color)

if platform.system() == 'Windows':
# Colors doesn't work in Windows
message = updated_text
else:
message = colored(updated_text, color)

print(message)

@staticmethod
Expand Down

0 comments on commit aec36ed

Please sign in to comment.