diff options
author | Christopher Rosell <chrippa@tanuki.se> | 2012-05-26 21:44:15 +0200 |
---|---|---|
committer | Christopher Rosell <chrippa@tanuki.se> | 2012-05-26 21:44:15 +0200 |
commit | 7802a2079970057831ecd5d4bf46f96e48d8eb18 (patch) | |
tree | 3843184c26b923f6735bdad512f779cfc94ed652 /src/livestreamer/compat.py | |
parent | dbe5e67d2685083769e7d154926e6a1a234fa3c4 (diff) |
Add support for writing stream to stdout.
Diffstat (limited to 'src/livestreamer/compat.py')
-rw-r--r-- | src/livestreamer/compat.py | 6 |
1 files changed, 4 insertions, 2 deletions
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 |