From 7802a2079970057831ecd5d4bf46f96e48d8eb18 Mon Sep 17 00:00:00 2001 From: Christopher Rosell Date: Sat, 26 May 2012 21:44:15 +0200 Subject: Add support for writing stream to stdout. --- src/livestreamer/compat.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/livestreamer/compat.py') diff --git a/src/livestreamer/compat.py b/src/livestreamer/compat.py index e9c8c78..4e007fa 100644 --- a/src/livestreamer/compat.py +++ b/src/livestreamer/compat.py @@ -6,16 +6,18 @@ is_py2 = (sys.version_info[0] == 2) is_py3 = (sys.version_info[0] == 3) if is_py2: - str = unicode input = raw_input + stdout = sys.stdout + str = unicode def bytes(b, enc="ascii"): return str(b) elif is_py3: - str = str bytes = bytes input = input + stdout = sys.stdout.buffer + str = str try: import urllib.request as urllib -- cgit v1.2.3