Permalink
Browse files

Reload sys module at startup to regain access to sys.setdefaultencodi…

…ng method.
  • Loading branch information...
bendmorris committed May 10, 2012
1 parent 9c015d3 commit de9e5e66c3a8c5ea0bda4b3d51605b754e4fae10
Showing with 1 addition and 0 deletions.
  1. +1 −0 main.py
View
@@ -9,6 +9,7 @@
import os
import sys
+reload(sys)
if hasattr(sys, 'setdefaultencoding'):
sys.setdefaultencoding('latin-1')
else:

1 comment on commit de9e5e6

@ethanwhite

This comment has been minimized.

Show comment Hide comment
@ethanwhite

ethanwhite May 10, 2012

Member

Let's definitely get a comment or two on all of this since it's definitely not obvious why we need to reload and even why we're doing the default encoding stuff.

Member

ethanwhite commented on de9e5e6 May 10, 2012

Let's definitely get a comment or two on all of this since it's definitely not obvious why we need to reload and even why we're doing the default encoding stuff.

Please sign in to comment.