From: Adam T. <a-t...@st...> - 2006-06-19 19:58:10
|
I completely spaced out this thread until after I updated today... > You could interrogate the Qt version, and do different things > depending > on the result, e.g.: > >>>> import qt >>>> qt.qVersion() > '3.3.4' >>>> qt.qVersion().split(".") > ['3', '3', '4'] > > qVersion mightn't be the right one, there are also the following: >>>> [x for x in qt.__dict__.keys() if x.lower().find("version")>=0] > ['PYQT_VERSION_STR', 'QT_VERSION', 'qVersion', 'QT_VERSION_STR', > 'PYQT_VERSION'] The problem with this approach is that the module names have changed from qt (Qt 2/3) to PyQt4 (Qt4), and if one is already loaded, it complains when the one tries to load the other. Do you know of an easy way to query the loaded modules, or is dir going to be the easiest way? Adam P.S. Glad to see you working on the pylint stuff. :o) |