Last active
December 1, 2015 16:53
-
-
Save scraperdragon/3634011 to your computer and use it in GitHub Desktop.
Let python redirect unicode stdout to files w/out crashing. Requires LANG=C.UTF-8 or similar in .profile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import codecs | |
import sys | |
sys.stdout = codecs.getwriter('utf-8')(sys.__stdout__) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment