frej/fast-export — pull request #7 by living180 (2012-09-30 13:22:57+00:00)
Title: Make Windows support actually work

My previous change to use sys.stdout.write instead of print didn't actually make any difference, because the transformation of LF to CRLF happens regardless of which way the LF characters are written. The only way I have found to actually make sys.stdout use binary mode is via the code posted by @dimo3d in issue #3. (I've tried doing a fdopen on sys.stdout to reopen it in binary mode but without success.)

This change implements that functionality for Windows. I have used this change in conjunction with git-hg to import the entire Python Mercurial repository into Git.