NeteaseMusicLyricDownloader/modules/clear_screen.py

12 lines
269 B
Python
Raw Permalink Normal View History

2022-04-02 22:50:52 +08:00
"""包含一个函数,用来清空命令行的信息,自动判别系统"""
import os
def clear():
name = os.name
if name == "nt":
os.system("cls")
elif name == "posix":
os.system("clear")
else:
os.system("clear")