mirror of
https://github.com/aljazceru/dev-gpt.git
synced 2025-12-20 23:24:20 +01:00
📜 fix: encoding error revert
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
|
import os
|
||||||
import platform
|
import platform
|
||||||
|
|
||||||
|
if platform.system() == "Windows":
|
||||||
|
os.system("color")
|
||||||
|
|
||||||
def print_colored(headline, text, color_code, end='\n'):
|
def print_colored(headline, text, color_code, end='\n'):
|
||||||
if color_code == 'black':
|
if color_code == 'black':
|
||||||
@@ -21,10 +24,6 @@ def print_colored(headline, text, color_code, end='\n'):
|
|||||||
color_start = f"\033[{color_code}m"
|
color_start = f"\033[{color_code}m"
|
||||||
reset = "\033[0m"
|
reset = "\033[0m"
|
||||||
bold_start = "\033[1m"
|
bold_start = "\033[1m"
|
||||||
if platform.system() == "Windows":
|
|
||||||
color_start = ""
|
|
||||||
reset = ""
|
|
||||||
bold_start = ""
|
|
||||||
if headline:
|
if headline:
|
||||||
print(f"{bold_start}{color_start}{headline}{reset}")
|
print(f"{bold_start}{color_start}{headline}{reset}")
|
||||||
print(f"{color_start}{text}{reset}", end=end)
|
print(f"{color_start}{text}{reset}", end=end)
|
||||||
|
|||||||
Reference in New Issue
Block a user