import re
import os
import os.path
+from io import open
from collections import OrderedDict
# Regular expression for comments in config file
"""
Load config from filepath
"""
- with open(filepath) as f:
+ with open(filepath, encoding='utf-8') as f:
content = ''.join(f.readlines())
match = comment_re.search(content)
while match:
else:
data[key] = value
# Save
- with open(path, 'w') as out:
+ with open(path, 'w', encoding='utf-8') as out:
json.dump(data, out, indent=4)
os.system('chmod 777 ' + path)
else:
raise Exception('No such config key.')
# Save
- with open(path, 'w') as out:
+ with open(path, 'w', encoding='utf-8') as out:
json.dump(data, out, indent=4)
os.system('chmod 777 ' + path)
from setuptools import setup, find_packages
+from io import open
import os
import os.path
import sys
setup(name='rainbowstream',
version=version,
description="A smart and nice Twitter client on terminal.",
- long_description=open("./README.rst", "r").read(),
+ long_description=open("./README.rst", "r", encoding='utf-8').read(),
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Console",