From 9cb9d0ef11fac861e46776fb18cef309df28c234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Thu, 30 Jul 2020 07:59:05 +0200 Subject: [PATCH] Fix writing binary data to sys.stdout --- terminaltables/terminal_io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terminaltables/terminal_io.py b/terminaltables/terminal_io.py index 8b8c10d..310263c 100644 --- a/terminaltables/terminal_io.py +++ b/terminaltables/terminal_io.py @@ -94,5 +94,5 @@ def set_terminal_title(title, kernel32=None): return kernel32.SetConsoleTitleW(title) != 0 # Linux/OSX. - sys.stdout.write(b'\033]0;' + title_bytes + b'\007') + sys.stdout.buffer.write(b'\033]0;' + title_bytes + b'\007') return True -- 2.28.0