Skip to content

Commit

Permalink
更新 color_cmd_handle.py 使windows cmd显示颜色
Browse files Browse the repository at this point in the history
使用 https://github.com/tartley/colorama 来显示颜色
该项目可能不经常维护,请注意兼容性。
  • Loading branch information
pskdje committed Nov 13, 2024
1 parent f3928ff commit f0d189b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions blm/color_cmd_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
except ImportError:
ls_uid=-65536

try:# 用于windows显示颜色
import colorama # 该项目可能缺乏维护
colorama.init()
except ImportError:
pass
except:
error("colorama启动失败")

def cbt(n):# 生成颜色操作
return f"\33[{n}m"
def cfc(n):# 生成前景颜色
Expand Down

0 comments on commit f0d189b

Please sign in to comment.