From 3cc5069d8bb4e6eefd2a31a637a5f17b9acce26f Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 25 Jul 2016 23:38:30 +0300 Subject: [PATCH] lib/python/init.py: colorize stdout from displayhook --- lib/python/init.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/python/init.py b/lib/python/init.py index 7377a26..4b8192f 100644 --- a/lib/python/init.py +++ b/lib/python/init.py @@ -138,7 +138,9 @@ def init(): self.stdin.write(value) def pprint(self, value): - pprint(value, stream=self.stdin) + pprint(value, + stream=ColoredFile(self.stdin, + '\033[1;3%sm' % stdout_color)) def close(self): self.stdin.close() -- 2.39.5