[PyQt] Moving PyQt programs to Python 3
akabaila at pcug.org.au
Thu Jul 14 10:28:46 BST 2011
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
But even if that number relates to the version of Python, it tells nothing
about the version of Python at binding to PyQt. The programs that use PyQt
depend on the version of Python as well as the versions of PyQt and Qt itself.
It would be helpful to be able to check those versions from PyQt alone.
> > 2. get open File Name dialog
Having read the reference and having corrected the File Dialog method, the
dialog works without a hiccup. Here is the corrected version, just in case
there are other people on the list that are as negligent as I:
filename = QFileDialog.getOpenFileName(
self, "Open File", ".", "Files (*.*)",
> The different APIs supported by sip.setapi() are intended to be used as
> portability aids.
Phil, Thank you for your patience and precise advice. It does mean so much!
More information about the PyQt