Update viewer for PyQt5 compatibility

Conflicts:
	skimage/viewer/tests/test_plugins.py
	skimage/viewer/tests/test_tools.py
This commit is contained in:
Steven Silvester
2014-12-27 10:52:27 -06:00
parent 6f1eb316d2
commit 65c1d4eec6
24 changed files with 161 additions and 211 deletions
+7 -1
View File
@@ -60,7 +60,13 @@ import os.path as _osp
import imp as _imp
import functools as _functools
import warnings as _warnings
from skimage._shared.utils import deprecated as _deprecated
import matplotlib as _mpl
try:
_imp.find_module('PyQt5')
_mpl.use('Qt5Agg')
except ImportError:
_mpl.use('Qt4Agg')
pkg_dir = _osp.abspath(_osp.dirname(__file__))
data_dir = _osp.join(pkg_dir, 'data')