Created
April 10, 2015 19:56
-
-
Save iamsudip/43e250d7b26f590c3d6c to your computer and use it in GitHub Desktop.
random gist
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, locale, sys | |
encoding = sys.stdout.encoding or locale.getpreferredencoding() | |
encoder = codecs.getwriter(encoding) | |
sys.stdout = encoder(sys.stdout,'backslashreplace') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment