articlib 0.2.3__tar.gz → 0.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of articlib might be problematic. Click here for more details.
- {articlib-0.2.3 → articlib-0.2.5}/LICENSE +21 -21
- {articlib-0.2.3 → articlib-0.2.5}/PKG-INFO +1 -1
- {articlib-0.2.3 → articlib-0.2.5}/README.md +51 -51
- articlib-0.2.5/articlib/articFileUtils.py +84 -0
- {articlib-0.2.3 → articlib-0.2.5}/articlib/articLogger.py +106 -102
- {articlib-0.2.3 → articlib-0.2.5}/articlib/consoleUtils.py +46 -36
- {articlib-0.2.3 → articlib-0.2.5}/articlib/dateTime.py +155 -121
- {articlib-0.2.3 → articlib-0.2.5}/articlib/dice.py +35 -32
- articlib-0.2.5/articlib/sqliteEngine.py +69 -0
- {articlib-0.2.3 → articlib-0.2.5}/articlib/systemUtils.py +33 -34
- {articlib-0.2.3 → articlib-0.2.5}/articlib/testEngine.py +128 -111
- {articlib-0.2.3 → articlib-0.2.5}/pyproject.toml +21 -16
- articlib-0.2.3/articlib/articFileUtils.py +0 -58
- articlib-0.2.3/articlib/sqliteEngine.py +0 -66
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
# MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023 Iñaki Arrondo
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
# MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Iñaki Arrondo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
# pythonLib
|
|
2
|
-
|
|
3
|
-
This is my personal general case python modules and apps to be used in other projects
|
|
4
|
-
|
|
5
|
-
## testEngine
|
|
6
|
-
|
|
7
|
-
Test engine is a simple module with the propose of running automated test, this allows to create test for the rest of the library easily. Test are separated in scenario, once a test in a scenario fail the rest of the scenario is skipped. It also outputs using colored test with errors in red and pass test in green. It has the following methods:
|
|
8
|
-
* testIfEqual
|
|
9
|
-
* testIfFalse
|
|
10
|
-
* testIfEqual
|
|
11
|
-
* testIfNotEqual
|
|
12
|
-
* ...
|
|
13
|
-
|
|
14
|
-
## dateTime
|
|
15
|
-
|
|
16
|
-
Library to manage dates for other proposes.
|
|
17
|
-
|
|
18
|
-
Public methods for setting dates
|
|
19
|
-
* __setToNow__
|
|
20
|
-
* __setTo__ (year, month, day, hour, minute, second)
|
|
21
|
-
* __setToString__ (string)
|
|
22
|
-
* __setMode__ (mode)
|
|
23
|
-
* _mode1_: YYYYMMDD
|
|
24
|
-
* _mode2_: DDMMYYYY
|
|
25
|
-
* _mode3_: MMDDYYYY
|
|
26
|
-
|
|
27
|
-
Public methods to get values from the object
|
|
28
|
-
* __getDate__
|
|
29
|
-
* __getTime__
|
|
30
|
-
* __getDateTime__
|
|
31
|
-
* __getYear__
|
|
32
|
-
* __getMonth__
|
|
33
|
-
* __getDay__
|
|
34
|
-
* __getHour__
|
|
35
|
-
* __getMinute__
|
|
36
|
-
* __getSecond__
|
|
37
|
-
* __getMode__
|
|
38
|
-
* __getDateTimePathFomat__ (It prints the date and time in a format usable in paths, for files)
|
|
39
|
-
|
|
40
|
-
## Log
|
|
41
|
-
|
|
42
|
-
A simple log system, it creates a log iwth 7 mask levels and a maximun size of file. If you log more lines than max it creates a new log file. Available masks
|
|
43
|
-
|
|
44
|
-
* INFO_MASK
|
|
45
|
-
* WARN_MASK
|
|
46
|
-
* ERROR_MASK
|
|
47
|
-
* COMMS_SEND_MASK
|
|
48
|
-
* COMMS_RECV_MASK
|
|
49
|
-
* HERMES_MASK000
|
|
50
|
-
* COMMS_MASK
|
|
51
|
-
* DEBUG_MASK
|
|
1
|
+
# pythonLib
|
|
2
|
+
|
|
3
|
+
This is my personal general case python modules and apps to be used in other projects
|
|
4
|
+
|
|
5
|
+
## testEngine
|
|
6
|
+
|
|
7
|
+
Test engine is a simple module with the propose of running automated test, this allows to create test for the rest of the library easily. Test are separated in scenario, once a test in a scenario fail the rest of the scenario is skipped. It also outputs using colored test with errors in red and pass test in green. It has the following methods:
|
|
8
|
+
* testIfEqual
|
|
9
|
+
* testIfFalse
|
|
10
|
+
* testIfEqual
|
|
11
|
+
* testIfNotEqual
|
|
12
|
+
* ...
|
|
13
|
+
|
|
14
|
+
## dateTime
|
|
15
|
+
|
|
16
|
+
Library to manage dates for other proposes.
|
|
17
|
+
|
|
18
|
+
Public methods for setting dates
|
|
19
|
+
* __setToNow__
|
|
20
|
+
* __setTo__ (year, month, day, hour, minute, second)
|
|
21
|
+
* __setToString__ (string)
|
|
22
|
+
* __setMode__ (mode)
|
|
23
|
+
* _mode1_: YYYYMMDD
|
|
24
|
+
* _mode2_: DDMMYYYY
|
|
25
|
+
* _mode3_: MMDDYYYY
|
|
26
|
+
|
|
27
|
+
Public methods to get values from the object
|
|
28
|
+
* __getDate__
|
|
29
|
+
* __getTime__
|
|
30
|
+
* __getDateTime__
|
|
31
|
+
* __getYear__
|
|
32
|
+
* __getMonth__
|
|
33
|
+
* __getDay__
|
|
34
|
+
* __getHour__
|
|
35
|
+
* __getMinute__
|
|
36
|
+
* __getSecond__
|
|
37
|
+
* __getMode__
|
|
38
|
+
* __getDateTimePathFomat__ (It prints the date and time in a format usable in paths, for files)
|
|
39
|
+
|
|
40
|
+
## Log
|
|
41
|
+
|
|
42
|
+
A simple log system, it creates a log iwth 7 mask levels and a maximun size of file. If you log more lines than max it creates a new log file. Available masks
|
|
43
|
+
|
|
44
|
+
* INFO_MASK
|
|
45
|
+
* WARN_MASK
|
|
46
|
+
* ERROR_MASK
|
|
47
|
+
* COMMS_SEND_MASK
|
|
48
|
+
* COMMS_RECV_MASK
|
|
49
|
+
* HERMES_MASK000
|
|
50
|
+
* COMMS_MASK
|
|
51
|
+
* DEBUG_MASK
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import shutil
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def deleteFile(path: str):
|
|
6
|
+
os.remove(path)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def createFile(path: str):
|
|
10
|
+
file = open(path, "r")
|
|
11
|
+
file.close()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def copyFile(source: str, destination: str):
|
|
15
|
+
shutil.copy(source, destination)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def fileExists(path: str):
|
|
19
|
+
return os.path.isfile(path)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def getFilesInDirectory(path: str):
|
|
23
|
+
return os.listdir(path)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def deleteDirectory(path: str):
|
|
27
|
+
os.rmdir(path)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def createDirectory(path: str):
|
|
31
|
+
os.makedirs(path, exist_ok=True)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class FileIO:
|
|
35
|
+
def __init__(self, path: str, readIt: bool = False) -> None:
|
|
36
|
+
self.path = path
|
|
37
|
+
if readIt:
|
|
38
|
+
self.readFile()
|
|
39
|
+
else:
|
|
40
|
+
self.lines = []
|
|
41
|
+
|
|
42
|
+
def readFile(self) -> None:
|
|
43
|
+
filePointer = open(self.path, "r")
|
|
44
|
+
self.lines = filePointer.readlines()
|
|
45
|
+
self.lines = [line[:-1] for line in self.lines]
|
|
46
|
+
filePointer.close()
|
|
47
|
+
|
|
48
|
+
def writeFile(self) -> None:
|
|
49
|
+
filePointer = open(self.path, "w")
|
|
50
|
+
for line in self.lines:
|
|
51
|
+
filePointer.write(line + "\n")
|
|
52
|
+
filePointer.close()
|
|
53
|
+
|
|
54
|
+
def appendToFile(self) -> None:
|
|
55
|
+
filePointer = open(self.path, "a")
|
|
56
|
+
for line in self.lines:
|
|
57
|
+
filePointer.write(line + "\n")
|
|
58
|
+
filePointer.close()
|
|
59
|
+
|
|
60
|
+
def addLine(self, line: str) -> None:
|
|
61
|
+
self.lines.append(line)
|
|
62
|
+
|
|
63
|
+
def modifyLine(self, lineNumber: int, line: str) -> None:
|
|
64
|
+
self.lines[lineNumber] = line
|
|
65
|
+
|
|
66
|
+
def removeLine(self, lineNumber: int) -> None:
|
|
67
|
+
del self.lines[lineNumber]
|
|
68
|
+
|
|
69
|
+
def removeLastLine(self) -> None:
|
|
70
|
+
del self.lines[-1]
|
|
71
|
+
|
|
72
|
+
def findLine(self, text: str) -> int:
|
|
73
|
+
result = []
|
|
74
|
+
for i in range(len(self.lines)):
|
|
75
|
+
if text in self.lines[i]:
|
|
76
|
+
result.append(i)
|
|
77
|
+
return result
|
|
78
|
+
|
|
79
|
+
def findAndReplace(self, find: str, replace: str) -> None:
|
|
80
|
+
for i in range(len(self.lines)):
|
|
81
|
+
self.lines[i] = self.lines[i].replace(find, replace)
|
|
82
|
+
|
|
83
|
+
def lineCount(self) -> int:
|
|
84
|
+
return len(self.lines)
|
|
@@ -1,102 +1,106 @@
|
|
|
1
|
-
import articlib.dateTime as dateTime
|
|
2
|
-
import os
|
|
3
|
-
|
|
4
|
-
if __name__ == "__main__":
|
|
5
|
-
pass
|
|
6
|
-
|
|
7
|
-
INFO_MASK = 0b00000001
|
|
8
|
-
WARN_MASK = 0b00000010
|
|
9
|
-
ERROR_MASK = 0b00000100
|
|
10
|
-
COMMS_SEND_MASK = 0b00001000
|
|
11
|
-
COMMS_RECV_MASK = 0b00010000
|
|
12
|
-
HERMES_MASK = 0b00100000
|
|
13
|
-
COMMS_MASK= 0b00011000
|
|
14
|
-
DEBUG_MASK = 0b01000000
|
|
15
|
-
DEFAULT_MASK = INFO_MASK | COMMS_MASK | ERROR_MASK | HERMES_MASK
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
self.
|
|
21
|
-
self.
|
|
22
|
-
self.
|
|
23
|
-
self.
|
|
24
|
-
self.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
self.
|
|
29
|
-
self.
|
|
30
|
-
self.
|
|
31
|
-
self.
|
|
32
|
-
self.
|
|
33
|
-
self.
|
|
34
|
-
self.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
self.logFile
|
|
46
|
-
self.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
self.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
def
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
def
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
def
|
|
86
|
-
self.mask = self.mask
|
|
87
|
-
|
|
88
|
-
def
|
|
89
|
-
self.
|
|
90
|
-
|
|
91
|
-
def
|
|
92
|
-
self.logFile.
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
def
|
|
100
|
-
self.
|
|
101
|
-
|
|
102
|
-
|
|
1
|
+
import articlib.dateTime as dateTime
|
|
2
|
+
import os
|
|
3
|
+
|
|
4
|
+
if __name__ == "__main__":
|
|
5
|
+
pass
|
|
6
|
+
|
|
7
|
+
INFO_MASK = 0b00000001
|
|
8
|
+
WARN_MASK = 0b00000010
|
|
9
|
+
ERROR_MASK = 0b00000100
|
|
10
|
+
COMMS_SEND_MASK = 0b00001000
|
|
11
|
+
COMMS_RECV_MASK = 0b00010000
|
|
12
|
+
HERMES_MASK = 0b00100000
|
|
13
|
+
COMMS_MASK = 0b00011000
|
|
14
|
+
DEBUG_MASK = 0b01000000
|
|
15
|
+
DEFAULT_MASK = INFO_MASK | COMMS_MASK | ERROR_MASK | HERMES_MASK
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class Logger:
|
|
19
|
+
def __init__(self):
|
|
20
|
+
self.init = False
|
|
21
|
+
self.logName = ""
|
|
22
|
+
self.maxLines = 0
|
|
23
|
+
self.lines = 0
|
|
24
|
+
self.logPath = ""
|
|
25
|
+
self.mask = 0b0
|
|
26
|
+
|
|
27
|
+
def initialize(self, logName, maxLines=1000, logPath="logs", mask=DEFAULT_MASK):
|
|
28
|
+
self.init = True
|
|
29
|
+
self.logName = logName
|
|
30
|
+
self.maxLines = maxLines
|
|
31
|
+
self.lines = 0
|
|
32
|
+
self.logPath = logPath
|
|
33
|
+
self.mask = mask
|
|
34
|
+
self.date = dateTime.createDate(dateTime.YYYYMMDD)
|
|
35
|
+
self.createLogFile()
|
|
36
|
+
|
|
37
|
+
def createLogFile(self):
|
|
38
|
+
self.date.setToNow()
|
|
39
|
+
dateSring = self.date.getDateTimePathFomat()
|
|
40
|
+
os.makedirs(self.logPath, exist_ok=True)
|
|
41
|
+
self.logFilePath = self.logPath + "/" + self.logName + "_" + dateSring + ".log"
|
|
42
|
+
if os.path.isfile(self.logFilePath):
|
|
43
|
+
self.logFile = open(self.logFilePath, "a")
|
|
44
|
+
else:
|
|
45
|
+
self.logFile = open(self.logFilePath, "w")
|
|
46
|
+
self.logFile.write(
|
|
47
|
+
f"Log file created at {self.date.getDateTime()} with name {self.logName}\n"
|
|
48
|
+
)
|
|
49
|
+
self.lines = 0
|
|
50
|
+
|
|
51
|
+
def addEntry(self, message, mask=INFO_MASK):
|
|
52
|
+
maskName = self.getMaskName(mask)
|
|
53
|
+
if mask & self.mask:
|
|
54
|
+
if self.init:
|
|
55
|
+
self.writeLog(message, maskName)
|
|
56
|
+
|
|
57
|
+
def getMaskName(self, mask):
|
|
58
|
+
switcher = {
|
|
59
|
+
INFO_MASK: "INFO",
|
|
60
|
+
WARN_MASK: "WARN",
|
|
61
|
+
ERROR_MASK: "ERROR",
|
|
62
|
+
COMMS_SEND_MASK: "COMMS_SEND",
|
|
63
|
+
COMMS_RECV_MASK: "COMMS_RECV",
|
|
64
|
+
HERMES_MASK: "HERMES",
|
|
65
|
+
DEBUG_MASK: "DEBUG",
|
|
66
|
+
DEFAULT_MASK: "DEFAULT",
|
|
67
|
+
}
|
|
68
|
+
return switcher.get(mask, "UNKNOWN")
|
|
69
|
+
|
|
70
|
+
def writeLog(self, message, maskName):
|
|
71
|
+
self.date.setToNow()
|
|
72
|
+
dateSring = self.date.getDateTime()
|
|
73
|
+
self.lines += 1
|
|
74
|
+
self.logFile.write(f"{dateSring} - {maskName} - {message}\n")
|
|
75
|
+
if self.lines >= self.maxLines:
|
|
76
|
+
self.logFile.close()
|
|
77
|
+
self.createLogFile()
|
|
78
|
+
|
|
79
|
+
def setMask(self, mask):
|
|
80
|
+
self.mask = mask
|
|
81
|
+
|
|
82
|
+
def getMask(self):
|
|
83
|
+
return self.mask
|
|
84
|
+
|
|
85
|
+
def setValueInMask(self, mask):
|
|
86
|
+
self.mask = self.mask | mask
|
|
87
|
+
|
|
88
|
+
def unsetValueInMask(self, mask):
|
|
89
|
+
self.mask = self.mask & ~mask
|
|
90
|
+
|
|
91
|
+
def flush(self):
|
|
92
|
+
self.logFile.flush()
|
|
93
|
+
|
|
94
|
+
def restartFile(self):
|
|
95
|
+
self.logFile.close()
|
|
96
|
+
self.lines = 0
|
|
97
|
+
self.createLogFile()
|
|
98
|
+
|
|
99
|
+
def getLogFilePath(self):
|
|
100
|
+
return self.logFilePath
|
|
101
|
+
|
|
102
|
+
def close(self):
|
|
103
|
+
self.logFile.close()
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
log = Logger()
|
|
@@ -1,36 +1,46 @@
|
|
|
1
|
-
import colorama
|
|
2
|
-
from colorama import Fore, Back, Style
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def
|
|
14
|
-
print(Fore.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
def
|
|
26
|
-
print(Style.BRIGHT +
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
import colorama
|
|
2
|
+
from colorama import Fore, Back, Style
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def printRed(text):
|
|
6
|
+
print(Fore.RED + text + Style.RESET_ALL)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def printGreen(text):
|
|
10
|
+
print(Fore.GREEN + text + Style.RESET_ALL)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def printYellow(text):
|
|
14
|
+
print(Fore.YELLOW + text + Style.RESET_ALL)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def printBlue(text):
|
|
18
|
+
print(Fore.BLUE + text + Style.RESET_ALL)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def printMagenta(text):
|
|
22
|
+
print(Fore.MAGENTA + text + Style.RESET_ALL)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def printBold(text):
|
|
26
|
+
print(Style.BRIGHT + text + Style.RESET_ALL)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def printRedBold(text):
|
|
30
|
+
print(Style.BRIGHT + Fore.RED + text + Style.RESET_ALL)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def printGreenBold(text):
|
|
34
|
+
print(Style.BRIGHT + Fore.GREEN + text + Style.RESET_ALL)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def printYellowBold(text):
|
|
38
|
+
print(Style.BRIGHT + Fore.YELLOW + text + Style.RESET_ALL)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def printBlueBold(text):
|
|
42
|
+
print(Style.BRIGHT + Fore.BLUE + text + Style.RESET_ALL)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def printMagentaBold(text):
|
|
46
|
+
print(Style.BRIGHT + Fore.MAGENTA + text + Style.RESET_ALL)
|