2023-05-07 01:59:03 +08:00
|
|
|
"""用来清空命令行的信息,自动判别系统"""
|
2023-04-04 19:58:02 +08:00
|
|
|
import os
|
2023-06-22 01:36:23 +08:00
|
|
|
from colorama import Fore
|
2023-04-04 19:58:02 +08:00
|
|
|
|
|
|
|
|
|
|
|
def clear():
|
|
|
|
name = os.name
|
|
|
|
if name == "nt":
|
|
|
|
os.system("cls")
|
|
|
|
elif name == "posix":
|
|
|
|
os.system("clear")
|
|
|
|
else:
|
2023-05-07 01:59:03 +08:00
|
|
|
os.system("clear")
|
|
|
|
|
|
|
|
|
|
|
|
def cls_stay(self, custom=""):
|
|
|
|
"""保留版本号清除屏幕"""
|
|
|
|
clear()
|
2023-06-22 01:36:23 +08:00
|
|
|
print(f"{Fore.YELLOW}[{Fore.GREEN}NeteaseMusicLyricDownloader{Fore.YELLOW}] {Fore.LIGHTBLACK_EX}{self.version}")
|
|
|
|
print(Fore.LIGHTMAGENTA_EX+custom)
|