projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a949a3a
)
Set stdout to binary mode under Windows (fixes issue #218)
author
Ricardo Garcia
<sarbalap+freshmeat@gmail.com>
Sat, 23 Oct 2010 10:22:42 +0000
(12:22 +0200)
committer
Ricardo Garcia
<sarbalap+freshmeat@gmail.com>
Sun, 31 Oct 2010 10:28:45 +0000
(11:28 +0100)
youtube-dl
patch
|
blob
|
history
diff --git
a/youtube-dl
b/youtube-dl
index 094a4164c8c668b8dbe1bcf83215ae87b25f832f..8494be96cbebcdb4eca535f6bcb33dab99edc55d 100755
(executable)
--- a/
youtube-dl
+++ b/
youtube-dl
@@
-94,6
+94,9
@@
def sanitize_open(filename, open_mode):
"""
try:
if filename == u'-':
+ if sys.platform == 'win32':
+ import msvcrt
+ msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
return (sys.stdout, filename)
stream = open(filename, open_mode)
return (stream, filename)