Python PyQt4.Qt.PYQT_VERSION_STR Examples
The following are 7
code examples of PyQt4.Qt.PYQT_VERSION_STR().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
PyQt4.Qt
, or try the search function
.
Example #1
Source File: aboutview.py From rexploit with GNU General Public License v3.0 | 5 votes |
def startUi(self): """This function checks if ui file exists and then show the view""" try: from PyQt4.Qt import PYQT_VERSION_STR as PYQTVERSION from nmap import __version__ as NMAPVERSION from fpdf import __version__ as FPDVERSION from requests import __version__ as REQUESTSVERSION self.load('about') # Connect things self.buttonBox.accepted.connect(self.buttonBoxAccepted) # Add information self.labelTitle.setText('RExploit (Router Exploitation)') self.labelDescription.setText( "This program is written on Python 2.7\n" "This program uses pyqt4 ({0}), fpdf ({1}),\n" "python-nmap ({2}) and requests ({3})\n\n" "Copyright(C) 2007 General Public License 3 (GPL3)\n".format(PYQTVERSION, FPDVERSION, NMAPVERSION, REQUESTSVERSION)) return True except Exception as e: MessageBox.critical("Error", str(e)) return False
Example #2
Source File: setup.py From artview with BSD 3-Clause "New" or "Revised" License | 5 votes |
def pre_instalation_tests(): # make tests before installing # to avoid risking breaking instalation do it in a try try: from tests.qt import test_matplotlib_qt_backend ans = test_matplotlib_qt_backend() if ans is False: exit(-1) except: pass # test dependencies from pkg_resources import parse_version dependencies = { 'pyart': '1.6', 'matplotlib': '1.1.0', # 'mpl_toolkits.basemap': '0.99', } for key in dependencies.keys(): dep = __import__(key, locals(), globals(), ['__name__']) if dependencies[key] is not None: if (parse_version(dep.__version__) < parse_version(dependencies[key])): raise Exception('Missing Dependency: %s >= %s. Has %s, %s' % (key, dependencies[key], key, dep.__version__)) # test pyqt4 (non standard version) try: from PyQt4.Qt import PYQT_VERSION_STR if (parse_version(PYQT_VERSION_STR) < parse_version('4.6')): raise Exception('Missing Dependency: %s >= %s. Has %s, %s' % ('PyQt4', '4.6', 'PyQt4', PYQT_VERSION_STR)) except ImportError: try: from PyQt5.Qt import PYQT_VERSION_STR except ImportError: raise Exception('Missing Dependency: PyQt')
Example #3
Source File: conftest.py From vnpy_crypto with MIT License | 4 votes |
def pytest_report_header(config): """ This function is used by py.test to insert a customized header into the test report. """ versions = os.linesep versions += 'PyQt4: ' try: from PyQt4 import Qt versions += "PyQt: {0} - Qt: {1}".format(Qt.PYQT_VERSION_STR, Qt.QT_VERSION_STR) except ImportError: versions += 'not installed' except AttributeError: versions += 'unknown version' versions += os.linesep versions += 'PyQt5: ' try: from PyQt5 import Qt versions += "PyQt: {0} - Qt: {1}".format(Qt.PYQT_VERSION_STR, Qt.QT_VERSION_STR) except ImportError: versions += 'not installed' except AttributeError: versions += 'unknown version' versions += os.linesep versions += 'PySide: ' try: import PySide from PySide import QtCore versions += "PySide: {0} - Qt: {1}".format(PySide.__version__, QtCore.__version__) except ImportError: versions += 'not installed' except AttributeError: versions += 'unknown version' versions += os.linesep versions += 'PySide2: ' try: import PySide2 from PySide2 import QtCore versions += "PySide: {0} - Qt: {1}".format(PySide2.__version__, QtCore.__version__) except ImportError: versions += 'not installed' except AttributeError: versions += 'unknown version' versions += os.linesep return versions
Example #4
Source File: conftest.py From winpython with MIT License | 4 votes |
def pytest_report_header(config): """ This function is used by py.test to insert a customized header into the test report. """ versions = os.linesep versions += 'PyQt4: ' try: from PyQt4 import Qt versions += "PyQt: {0} - Qt: {1}".format(Qt.PYQT_VERSION_STR, Qt.QT_VERSION_STR) except ImportError: versions += 'not installed' except AttributeError: versions += 'unknown version' versions += os.linesep versions += 'PyQt5: ' try: from PyQt5 import Qt versions += "PyQt: {0} - Qt: {1}".format(Qt.PYQT_VERSION_STR, Qt.QT_VERSION_STR) except ImportError: versions += 'not installed' except AttributeError: versions += 'unknown version' versions += os.linesep versions += 'PySide: ' try: import PySide from PySide import QtCore versions += "PySide: {0} - Qt: {1}".format(PySide.__version__, QtCore.__version__) except ImportError: versions += 'not installed' except AttributeError: versions += 'unknown version' versions += os.linesep versions += 'PySide2: ' try: import PySide2 from PySide2 import QtCore versions += "PySide: {0} - Qt: {1}".format(PySide2.__version__, QtCore.__version__) except ImportError: versions += 'not installed' except AttributeError: versions += 'unknown version' versions += os.linesep return versions
Example #5
Source File: conftest.py From P4VFX with MIT License | 4 votes |
def pytest_report_header(config): """ This function is used by py.test to insert a customized header into the test report. """ versions = os.linesep versions += 'PyQt4: ' try: from PyQt4 import Qt versions += "PyQt: {0} - Qt: {1}".format(Qt.PYQT_VERSION_STR, Qt.QT_VERSION_STR) except ImportError: versions += 'not installed' except AttributeError: versions += 'unknown version' versions += os.linesep versions += 'PyQt5: ' try: from PyQt5 import Qt versions += "PyQt: {0} - Qt: {1}".format(Qt.PYQT_VERSION_STR, Qt.QT_VERSION_STR) except ImportError: versions += 'not installed' except AttributeError: versions += 'unknown version' versions += os.linesep versions += 'PySide: ' try: import PySide from PySide import QtCore versions += "PySide: {0} - Qt: {1}".format(PySide.__version__, QtCore.__version__) except ImportError: versions += 'not installed' except AttributeError: versions += 'unknown version' versions += os.linesep versions += 'PySide2: ' try: import PySide2 from PySide2 import QtCore versions += "PySide: {0} - Qt: {1}".format(PySide2.__version__, QtCore.__version__) except ImportError: versions += 'not installed' except AttributeError: versions += 'unknown version' versions += os.linesep return versions
Example #6
Source File: conftest.py From P4VFX with MIT License | 4 votes |
def pytest_report_header(config): """ This function is used by py.test to insert a customized header into the test report. """ versions = os.linesep versions += 'PyQt4: ' try: from PyQt4 import Qt versions += "PyQt: {0} - Qt: {1}".format(Qt.PYQT_VERSION_STR, Qt.QT_VERSION_STR) except ImportError: versions += 'not installed' except AttributeError: versions += 'unknown version' versions += os.linesep versions += 'PyQt5: ' try: from PyQt5 import Qt versions += "PyQt: {0} - Qt: {1}".format(Qt.PYQT_VERSION_STR, Qt.QT_VERSION_STR) except ImportError: versions += 'not installed' except AttributeError: versions += 'unknown version' versions += os.linesep versions += 'PySide: ' try: import PySide from PySide import QtCore versions += "PySide: {0} - Qt: {1}".format(PySide.__version__, QtCore.__version__) except ImportError: versions += 'not installed' except AttributeError: versions += 'unknown version' versions += os.linesep versions += 'PySide2: ' try: import PySide2 from PySide2 import QtCore versions += "PySide: {0} - Qt: {1}".format(PySide2.__version__, QtCore.__version__) except ImportError: versions += 'not installed' except AttributeError: versions += 'unknown version' versions += os.linesep return versions
Example #7
Source File: conftest.py From qtpy with MIT License | 4 votes |
def pytest_report_header(config): """ This function is used by py.test to insert a customized header into the test report. """ versions = os.linesep versions += 'PyQt4: ' try: from PyQt4 import Qt versions += "PyQt: {0} - Qt: {1}".format(Qt.PYQT_VERSION_STR, Qt.QT_VERSION_STR) except ImportError: versions += 'not installed' except AttributeError: versions += 'unknown version' versions += os.linesep versions += 'PyQt5: ' try: from PyQt5 import Qt versions += "PyQt: {0} - Qt: {1}".format(Qt.PYQT_VERSION_STR, Qt.QT_VERSION_STR) except ImportError: versions += 'not installed' except AttributeError: versions += 'unknown version' versions += os.linesep versions += 'PySide: ' try: import PySide from PySide import QtCore versions += "PySide: {0} - Qt: {1}".format(PySide.__version__, QtCore.__version__) except ImportError: versions += 'not installed' except AttributeError: versions += 'unknown version' versions += os.linesep versions += 'PySide2: ' try: import PySide2 from PySide2 import QtCore versions += "PySide: {0} - Qt: {1}".format(PySide2.__version__, QtCore.__version__) except ImportError: versions += 'not installed' except AttributeError: versions += 'unknown version' versions += os.linesep return versions