Detect Version of PyQT Bindings?

Boudewijn Rempt boud at valdyas.org
Thu Mar 7 10:24:38 EST 2002


Ingo Linkweiler wrote:

> Hi,
> 
> does anybody know how I can detect the version of the python QT
> bindings? (Not the version of QT itself)
> I want to use qt canvas. Version 3.0 requires an extra:
> from qtcanvas import *
> but with older versions this was included with "from qt import *"
> 
> OK, I can do it this way:
> 
> try
>     from qtcanvas import *
> except:
>     pass
> 
> any better ideas?
> 

I think that's it, basically -- because the qt.py doesn't include
a version number itself. Of course, even if Phil were to add one,
it wouldn't help all that much, since previous versions wouldn't
have it, so you'd have to check anyway for the existence of 
something.

-- 
Boudewijn Rempt | http://www.valdyas.org



More information about the Python-list mailing list