]> git.phdru.name Git - dotfiles.git/commitdiff
lib/python/init.py: colorize stdout from displayhook
authorOleg Broytman <phd@phdru.name>
Mon, 25 Jul 2016 20:38:30 +0000 (23:38 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 25 Jul 2016 20:40:38 +0000 (23:40 +0300)
lib/python/init.py

index 7377a26912ec83ab2d87abc833b36a211460f244..4b8192fba9dfa828ec594955f9046d3b9750f4bd 100644 (file)
@@ -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()