Utilities/PySideImporter.py

Wed, 04 Nov 2015 16:25:25 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 04 Nov 2015 16:25:25 +0100
changeset 4543
2e6a880670e9
parent 4021
195a471c327b
child 4555
861e1741985c
permissions
-rw-r--r--

Fixed a few code style issues (forgotten future imports, copyrights,...).
(grafted from e8ddd9d76414329dc056f4d6ee712bc6847af049)

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
4021
195a471c327b Updated copyright for 2015.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3178
diff changeset
3 # Copyright (c) 2011 - 2015 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
4543
2e6a880670e9 Fixed a few code style issues (forgotten future imports, copyrights,...).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
10 from __future__ import unicode_literals
2e6a880670e9 Fixed a few code style issues (forgotten future imports, copyrights,...).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
11
1142
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12 import sys
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14 if __name__ == "__main__":
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 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
16 import PySide # __IGNORE_EXCEPTION__ __IGNORE_WARNING__
1142
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 ret = 0
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 except ImportError:
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 ret = 1
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 sys.exit(ret)
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 #
01ae8e2946d3 Improved the code to detect PySide.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 # eflag: FileType = Python2

eric ide

mercurial