[PyQt] Moving PyQt programs to Python 3
phil at riverbankcomputing.com
Thu Jul 14 10:35:55 BST 2011
On Thu, 14 Jul 2011 19:28:46 +1000, Algis Kabaila <akabaila at pcug.org.au>
> On Thu, 14 Jul 2011 06:28:48 PM Phil Thompson wrote:
>> On Thu, 14 Jul 2011 14:26:40 +1000, Algis Kabaila
<akabaila at pcug.org.au>
>> > 1. How to tell which Python version a given PyQt is bound to?
> I don't think that answers the (reformatted) question. From idle the
> sys.hexversion does show some magic number
>>>> import sys
The docs tell you how to interpret it, try hex(sys.hexversion).
> But even if that number relates to the version of Python, it tells
> about the version of Python at binding to PyQt. The programs that use
> depend on the version of Python as well as the versions of PyQt and Qt
> It would be helpful to be able to check those versions from PyQt alone.
The major and minor version must match what's in sys.hexversion otherwise
the import would fail. The micro version is irrelevant.
More information about the PyQt