Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6c5cd98
commit ce01e71
Showing
7 changed files
with
59 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,32 @@ | ||
from termcolor import colored | ||
from lib.util import color | ||
from lib.context import context | ||
|
||
def error(content): | ||
context.screenLock.acquire() | ||
print(colored(content, 'red', 'on_grey')) | ||
context.screenLock.release() | ||
|
||
def correct(content): | ||
context.screenLock.acquire() | ||
print(colored(content, 'green', 'on_grey')) | ||
context.screenLock.release() | ||
|
||
|
||
def detail(content): | ||
context.screenLock.acquire() | ||
print(colored(content, 'blue', 'on_grey')) | ||
context.screenLock.release() | ||
|
||
|
||
def plain(content): | ||
print(colored(content, 'cyan', 'on_grey')) | ||
context.screenLock.acquire() | ||
print(colored(content, 'white', 'on_grey')) | ||
context.screenLock.release() | ||
|
||
|
||
def http(content, code): | ||
context.screenLock.acquire() | ||
color_config = color.colorProjection(code) | ||
print(colored(content, color_config[0], color_config[1])) | ||
print(colored(content, color_config[0], color_config[1])) | ||
context.screenLock.release() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import subprocess | ||
import platform | ||
import sys | ||
|
||
def clear(): | ||
if platform.system()=="Windows": | ||
subprocess.Popen("cls", shell=True).communicate() | ||
else: | ||
print("\033c", end="") | ||
sys.stdout.write("\033c") |