diff --git a/termenu-cmd b/termenu-cmd index 26181f2..77989fa 100755 --- a/termenu-cmd +++ b/termenu-cmd @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import re import sys import termenu diff --git a/termenu/termenu.py b/termenu/termenu.py index 2abf1ed..0a3adb3 100644 --- a/termenu/termenu.py +++ b/termenu/termenu.py @@ -571,9 +571,9 @@ def redirect_std(): stdin = sys.stdin stdout = sys.stdout if not sys.stdin.isatty(): - sys.stdin = open("/dev/tty", "r", 0) + sys.stdin = open("/dev/tty", "rb", 0) if not sys.stdout.isatty(): - sys.stdout = open("/dev/tty", "w", 0) + sys.stdout = open("/dev/tty", "wb", 0) return stdin, stdout