aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sources/pyside2/PySide2/__init__.py.in12
1 files changed, 11 insertions, 1 deletions
diff --git a/sources/pyside2/PySide2/__init__.py.in b/sources/pyside2/PySide2/__init__.py.in
index d896ab603..b6d0b89b3 100644
--- a/sources/pyside2/PySide2/__init__.py.in
+++ b/sources/pyside2/PySide2/__init__.py.in
@@ -1,3 +1,6 @@
+from __future__ import print_function
+
+
__all__ = list("Qt" + body for body in
"@all_module_shortnames@"
.split(";"))
@@ -18,7 +21,14 @@ def _setupQtDirectories():
# the libshiboken library location. Importing the module
# loads the libraries into the process memory beforehand, and
# thus takes care of it for us.
- import shiboken2
+ try:
+ import shiboken2
+ except Exception:
+ paths = ', '.join(sys.path)
+ print('PySide2/__init__.py: Unable to import shiboken2 from {}'.format(paths),
+ file=sys.stderr)
+ raise
+
# Trigger signature initialization.
type.__signature__