Closed tritemio closed 10 years ago
Just adding the conditional import:
try:
from PySide import QtGui, QtCore
except ImportError:
from PyQt4 import QtGui, QtCore
makes FRETBursts compatible with both PyQT4 and PySide (various GUI plots tested).
Commit 16991d8ff20536b9e9acc52fa3c4c17a7520fdfa close the issue adding compatibility with both PyQT4 and PySide.
Anaconda and WinPython distributions use PyQt4 by default. Anaconda switched to PyQt4 recently but PySide is still available for the foreseeable future.
FRETBursts currently uses PySide, so the user is required to change the default backend from PyQt4 to PySide (editing matplotlibrc) to avoid compatibility issues with non-inline plots and external GUI tools.
Switching to PyQt4 would remove this requirement on the user.
The switch to PyQt4 should be relatively easy. However, PyQt4 offers 2 APIs v1 and v2. v2 is much simpler and the default for python 3. The v2 API can also be used with python 2 but the compatibility with matplotlib and spyder has to be checked first.
Also, seems that IPython has slightly better support for PyQt4.