/usr/share/pyshared/tp/netlib/support/output.py is in python-tp-netlib 0.2.5-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | import sys
def green(string, flush=1):
if sys.platform.startswith('linux'):
sys.stdout.write("[01;32m")
sys.stdout.write(string)
if sys.platform.startswith('linux'):
sys.stdout.write("[0m")
if flush:
try:
sys.stdout.flush()
except:
pass
def red(string, flush=1):
if sys.platform.startswith('linux'):
sys.stdout.write("[01;31m")
sys.stdout.write(string)
if sys.platform.startswith('linux'):
sys.stdout.write("[0m")
if flush:
try:
sys.stdout.flush()
except:
pass
|