[PyQt] Moving PyQt programs to Python 3

Phil Thompson phil at riverbankcomputing.com
Thu Jul 14 09:28:48 BST 2011


On Thu, 14 Jul 2011 14:26:40 +1000, Algis Kabaila <akabaila at pcug.org.au>
wrote:
> 1. Is it possible to detect which Python version PyQt has been
> built/compiled?  
> Just as the version of PyQt can be seen from PYQT_VERSION_STR and Qt
from 
> QT_VERSION_STR, it would be handy to be able to see version of Python
> (perhaps 
> it is possible  :)

sys.hexversion?

> 2. I do not know if it is intended to minimise the changes when moving
> with 
> PyQt from Python2.x to Python3.x.  It would be nice if that was the 
> case.
> 
> The following example shows a file name open dialog that works in PyQt
> version 
> with Python2.x, but fails in PyQt version with Python3.2:

See...

http://www.riverbankcomputing.com/static/Docs/PyQt4/html/python_v3.html#qfiledialog

The different APIs supported by sip.setapi() are intended to be used as
portability aids.

Phil



More information about the PyQt mailing list