def appendQt(self): import qtui self.open() self.write("QT.VERSION: %s", qtui.getQtVersionString()) self.write("QT.JPG_SUPPORT: %s", "supported" if qtui.supportsJPG() else "not supported") self.write("QT.SVG_SUPPORT: %s", "supported" if qtui.supportsSVG() else "not supported") py_plugin_path = os.path.pathsep.join([ getpath.pathToUnicode(p) for p in qtui.QtCore.QCoreApplication.libraryPaths() ]) self.write("QT.PLUGIN_PATH: %s" % py_plugin_path) qt_plugin_path_env = os.environ[ 'QT_PLUGIN_PATH'] if 'QT_PLUGIN_PATH' in os.environ else "" self.write("QT.PLUGIN_PATH_ENV: %s" % getpath.pathToUnicode(qt_plugin_path_env)) qt_conf_present = os.path.isfile(getpath.getSysPath('qt.conf')) if qt_conf_present: import io f = io.open(getpath.getSysPath('qt.conf'), "r", encoding="utf-8", errors="replace") qt_conf_content = f.read() qt_conf_content = qt_conf_content.replace( '\n', '\n' + (' ' * len('QT.CONF: '))).strip() f.close() self.write("QT.CONF: %s" % qt_conf_content) else: self.write("QT.CONF: NOT PRESENT") self.close()
def reset(self): self.open() self.write("SVN REVISION: %s [%s]", os.environ['SVNREVISION'], os.environ['SVNREVISION_SOURCE']) self.write("HOME LOCATION: %s", self.home) version = re.sub(r"[\r\n]"," ", sys.version) self.write("SYS.VERSION: %s", version) self.write("SYS.PLATFORM: %s", sys.platform) self.write("PLATFORM.MACHINE: %s", platform.machine()) self.write("PLATFORM.PROCESSOR: %s", platform.processor()) self.write("PLATFORM.UNAME.RELEASE: %s", platform.uname()[2]) if sys.platform == 'linux2': self.write("PLATFORM.LINUX_DISTRIBUTION: %s", string.join(platform.linux_distribution()," ")) if sys.platform.startswith("darwin"): self.write("PLATFORM.MAC_VER: %s", platform.mac_ver()[0]) if sys.platform == 'win32': self.write("PLATFORM.WIN32_VER: %s", string.join(platform.win32_ver()," ")) import numpy self.write("NUMPY.VERSION: %s", numpy.__version__) from qtui import getQtVersionString self.write("PYQT.VERSION: %s", getQtVersionString()) self.close()
def appendQt(self): import qtui self.open() self.write("PYQT.VERSION: %s", qtui.getQtVersionString()) self.write("PYQT.SVG_SUPPORT: %s", "supported" if qtui.supportsSVG() else "not supported") self.close()
def appendQt(self): import qtui self.open() self.write("PYQT.VERSION: %s", qtui.getQtVersionString()) self.write("PYQT.JPG_SUPPORT: %s", "supported" if qtui.supportsJPG() else "not supported") self.write("PYQT.SVG_SUPPORT: %s", "supported" if qtui.supportsSVG() else "not supported") py_plugin_path = os.path.pathsep.join( [getpath.pathToUnicode(str(p)) for p in qtui.QtCore.QCoreApplication.libraryPaths()] ) self.write("QT.PLUGIN_PATH: %s" % py_plugin_path) qt_plugin_path_env = os.environ["QT_PLUGIN_PATH"] if "QT_PLUGIN_PATH" in os.environ else "" self.write("QT.PLUGIN_PATH_ENV: %s" % qt_plugin_path_env) qt_conf_present = os.path.isfile(getpath.getSysPath("qt.conf")) if qt_conf_present: from codecs import open f = open(getpath.getSysPath("qt.conf"), "r", encoding="utf-8", errors="replace") qt_conf_content = f.read() qt_conf_content = qt_conf_content.replace("\n", "\n" + (" " * len("QT.CONF: "))).strip() f.close() self.write("QT.CONF: %s" % qt_conf_content) else: self.write("QT.CONF: NOT PRESENT") self.close()
def appendQt(self): import qtui self.open() self.write("PYQT.VERSION: %s", qtui.getQtVersionString()) self.close()