Created
March 19, 2018 21:13
-
-
Save ross-g/203a626bf4e5b48b37f9d37e60d623dc to your computer and use it in GitHub Desktop.
Maya Pyside import for compatibility across versions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
from PySide2 import QtCore, QtGui, QtWidgets | |
from shiboken2 import wrapInstance | |
except ImportError: | |
from PySide import QtCore, QtGui | |
from PySide import QtGui as QtWidgets | |
from shiboken import wrapInstance |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment