Skip to content

Commit

Permalink
Open rcfile with utf-8 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Nov 8, 2018
1 parent fbf626b commit 288475c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions holoviews/__init__.py
@@ -1,6 +1,6 @@

from __future__ import print_function, absolute_import
import os, pydoc
import os, pydoc, io

import numpy as np # noqa (API import)
import param
Expand Down Expand Up @@ -52,7 +52,7 @@ def __call__(self, *args, **opts): # noqa (dummy signature)
"~/.config/holoviews/holoviews.rc"]:
filename = os.path.expanduser(rcfile)
if os.path.isfile(filename):
with open(filename) as f:
with io.open(filename, encoding='utf8') as f:
code = compile(f.read(), filename, 'exec')
try:
exec(code)
Expand Down Expand Up @@ -87,4 +87,4 @@ def help(obj, visualization=True, ansi=True, backend=None,
pydoc.help(obj)


del absolute_import, np, os, print_function, pydoc, rcfile, warnings
del absolute_import, io, np, os, print_function, pydoc, rcfile, warnings

0 comments on commit 288475c

Please sign in to comment.