Utilities/PySideImporter.py

Sat, 05 Jul 2014 15:02:45 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 05 Jul 2014 15:02:45 +0200
changeset 3682
2543741b47b7
parent 3178
f25fc1364c88
child 4021
195a471c327b
permissions
-rw-r--r--

Changed a few files to reference eric6.

1142
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
3161
06f57a834adf Updated copyright for 2014.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2679
diff changeset
3 # Copyright (c) 2011 - 2014 Detlev Offenbach <detlev@die-offenbachs.de>
1142
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module to check for the presence of PySide by importing it.
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 import sys
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12 if __name__ == "__main__":
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 try:
1310
7fdcfa822e3e Extended debugger to ignore exceptions occuring in lines having a '__IGNORE_EXCEPTION__' line flag set.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1142
diff changeset
14 import PySide # __IGNORE_EXCEPTION__ __IGNORE_WARNING__
1142
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 ret = 0
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 except ImportError:
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 ret = 1
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 sys.exit(ret)
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 #
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 # eflag: FileType = Python2

eric ide

mercurial