I want to do something like:
try:
import QtPy
except ImportError:
pass
and have this also catch the case where PyQt5 or PySide aren't installed. However, in those cases the exception is PythonQtError rather than ImportError. However, I can't catch PythonQtError because I can't do from qtpy import PythonQtError since QtPy won't import...
Since I don't watch to just catch Exception, could PythonQtError be made a subclass of ImportError?
I want to do something like:
and have this also catch the case where PyQt5 or PySide aren't installed. However, in those cases the exception is
PythonQtErrorrather thanImportError. However, I can't catchPythonQtErrorbecause I can't dofrom qtpy import PythonQtErrorsince QtPy won't import...Since I don't watch to just catch
Exception, couldPythonQtErrorbe made a subclass ofImportError?