shenjack
d84b490b99
Add | more formatter and some more Fix | type mis match sync pyglet Enhance | logger with Template add lib-not-dr as requirement sync pyglet sync pyglet Add | add lto=yes to nuitka_build just incase sync pyglet sync lib_not_dr Remove | external requirement lib-not-dr some logger sync lib-not-dr sync pyglet sync lib-not-dr sync lib-not-dr sync pyglet sync pyglet Fix | console thread been block Update DR rs and DR sdk sync lib not dr sync lib-not-dr sync lib-not-dr sync pyglet and lib-not-dr sync pyglet 0.1.8 sync lib not dr logger almost done? almost! sync pyglet (clicpboard support!) sync lib not dr sync lib not dr color code and sync pyglet do not show memory and progress building localy sync pyglet synclibs
34 lines
845 B
Python
34 lines
845 B
Python
# -------------------------------
|
|
# Difficult Rocket
|
|
# Copyright © 2020-2023 by shenjackyuanjie 3695888@qq.com
|
|
# All rights reserved
|
|
# -------------------------------
|
|
import sys
|
|
|
|
from lib_not_dr.types.options import Options
|
|
|
|
COLOR_SUPPORT = True
|
|
|
|
if sys.platform == "win32":
|
|
try:
|
|
# https://stackoverflow.com/questions/36760127/...
|
|
# how-to-use-the-new-support-for-ansi-escape-sequences-in-the-windows-10-console
|
|
from ctypes import windll
|
|
|
|
kernel32 = windll.kernel32
|
|
kernel32.SetConsoleMode(kernel32.GetStdHandle(-11), 7)
|
|
except OSError: # pragma: no cover
|
|
COLOR_SUPPORT = False
|
|
|
|
|
|
class LogLevel(Options):
|
|
name = 'LogLevel'
|
|
notset: int = 0
|
|
trace: int = 5
|
|
fine: int = 7
|
|
debug: int = 10
|
|
info: int = 20
|
|
warn: int = 30
|
|
error: int = 40
|
|
fatal: int = 50
|