Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #9 from weiwei-cool/main
Browse files Browse the repository at this point in the history
修复清屏函数在非win系统的bug
  • Loading branch information
shing-yu authored Oct 17, 2023
2 parents 62280ac + 99effd2 commit 1d445c4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import os
import re
import requests
import platform
from sys import exit
from packaging import version

Expand Down Expand Up @@ -377,4 +378,8 @@ def compare_versions(version1, version2):


def clear_screen():
os.system('cls')
# 根据系统类型执行不同的清屏指令
if platform.system() == 'Windows':
os.system('cls') # Windows系统清屏命令
else:
os.system('clear') # Unix/Linux/Mac系统清屏命令

0 comments on commit 1d445c4

Please sign in to comment.