I have a very basic script named colors
to print "HEY" in green and bold using codes around the text.
colors:
#!/usr/bin/env python
a = '\033[0m\033[32m\033[01mHEY\033[0m'
print a
the \033[01m
is making the text bold.
the \033[32m
is making the text green.
the \033[0m
should be around the text in both sides.
- When I run the script on my machine - it prints in bold and green.
- When I run the script on my machine with watch (
watch -c colors
) - it prints in bold and green. - When I run the script on a server via SSH - it prints in bold and green.
- When I run the script on a server with watch and via SSH
(
watch -c colors
) - in prints only bold.
I don't understand why the combination of the watch and doing it via ssh is making it print only bold and ignore the green. am I missing something?
What is the problem here?