Skip to content

Instantly share code, notes, and snippets.

@mfa
Created April 4, 2014 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfa/9982904 to your computer and use it in GitHub Desktop.
Save mfa/9982904 to your computer and use it in GitHub Desktop.
import sys
import locale
if sys.stdout.isatty():
default_encoding = sys.stdout.encoding
else:
default_encoding = locale.getpreferredencoding()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment