Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F8310231
message.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
message.py
View Options
try
:
import
colorama
colorama
.
init
()
reset
=
colorama
.
Fore
.
RESET
green
=
colorama
.
Fore
.
GREEN
yellow
=
colorama
.
Fore
.
YELLOW
blue
=
colorama
.
Fore
.
BLUE
red
=
colorama
.
Fore
.
RED
colorama
.
deinit
()
except
ImportError
as
e
:
reset
=
"
\033
[0m"
green
=
"
\033
[32m"
yellow
=
"
\033
[33m"
blue
=
"
\033
[34m"
red
=
"
\033
[31m"
from
sys
import
argv
from
os
import
path
exec_str
=
path
.
basename
(
argv
[
0
])
+
": "
green_indent
=
green
+
exec_str
+
reset
blue_indent
=
blue
+
exec_str
+
reset
yellow_indent
=
yellow
+
exec_str
+
reset
red_indent
=
red
+
exec_str
+
reset
indent
=
len
(
exec_str
)
*
" "
def
error
(
string
):
lines
=
[
l
.
rstrip
()
for
l
in
string
.
split
(
"
\n
"
)]
if
len
(
lines
)
==
0
:
lines
=
[
""
]
print
red_indent
+
lines
[
0
]
for
line
in
lines
[
1
:]:
print
indent
+
line
+
reset
def
progress
(
string
):
lines
=
[
l
.
rstrip
()
for
l
in
string
.
split
(
"
\n
"
)]
if
len
(
lines
)
==
0
:
lines
=
[
""
]
print
green_indent
+
lines
[
0
]
for
line
in
lines
[
1
:]:
print
indent
+
line
+
reset
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Sat, Dec 21, 5:48 PM (9 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4023695
Default Alt Text
message.py (1 KB)
Attached To
rMATTHEWHEPHG matthew4hephg
Event Timeline
Log In to Comment