-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsystools.py
More file actions
31 lines (29 loc) · 713 Bytes
/
Copy pathsystools.py
File metadata and controls
31 lines (29 loc) · 713 Bytes
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
##
# \file systools.py
# \package systools
# quick tools for general purposes
#
##
# \brief Create warning message in red
# \param message a string of warning message
# \param color the color of the warning message
#
# The selection of colors refers to
# [ANSI Escape sequences](http://ascii-table.com/ansi-escape-sequences.php)
#
# --------------
# | id | color |
# |----|-------|
# | 31 | red |
# | 34 | blue |
# | 32 | green |
# | 33 | yellow|
# --------------
def warning(message,color=31):
## Define warning color
cWARNING = '\033[%dm'%color
## Define Normal color
ENDC = '\033[0m'
print cWARNING+message+ENDC
## Newline symbol for Linux system
NEWLINE = '\n'