Compatibility fix

This commit is contained in:
Stefan Ritter 2011-05-18 23:05:51 +02:00
parent ab959ad834
commit b06dc41a2c

View File

@ -20,8 +20,11 @@ import locale
import re
import codecs
# print() will output ascii, but we want utf-8
sys.stdout = codecs.getwriter('utf8')(sys.stdout.buffer)
# print() will output ascii, but we want utf-8 (python3)
try:
sys.stdout = codecs.getwriter('utf8')(sys.stdout.buffer)
except:
None
# Backward compatibilty to python2
try: