-
Notifications
You must be signed in to change notification settings - Fork 20
/
console.py
37 lines (30 loc) · 1.26 KB
/
console.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# -*- coding: utf-8 -*-
# Copyright (C) 2021 github.com/ItsChasa
#
# This source code has been released under the GNU Affero General Public
# License v3.0. A copy of this license is available at
# https://www.gnu.org/licenses/agpl-3.0.en.html
from main import colours
class prnt():
def __init__(self) -> None:
pass
def success(self, content, end="\n", indent=0):
ind = ""
for _ in range(indent): ind += " "
print(f"{ind}{colours['green']}>{colours['white']} {content}", end=end)
def info(self, content, end="\n", indent=0):
ind = ""
for _ in range(indent): ind += " "
print(f"{ind}{colours['white']}> {content}", end=end)
def fail(self, content, end="\n", indent=0):
ind = ""
for _ in range(indent): ind += " "
print(f"{ind}{colours['light_red']}>{colours['white']} {content}", end=end)
def inp(self, content, end="\n", indent=0):
ind = ""
for _ in range(indent): ind += " "
print(f"{ind}{colours['light_blue']}>{colours['white']} {content}", end=end)
def warn(self, content, end="\n", indent=0):
ind = ""
for _ in range(indent): ind += " "
print(f"{ind}{colours['yellow']}>{colours['white']} {content}", end=end)