On 10/20/2010 02:38 PM, Neal Becker wrote:
Has anyone attempted a pyqt for python3?
I did. It failed (not on Fedora though and I didn't investigate at the time). I seem to remember some symbol problems with QString class that was reported when I tried to import PyQt from python3 interpreter.
Stanislav Ochotnicky wrote:
On 10/20/2010 02:38 PM, Neal Becker wrote:
Has anyone attempted a pyqt for python3?
I did. It failed (not on Fedora though and I didn't investigate at the time). I seem to remember some symbol problems with QString class that was reported when I tried to import PyQt from python3 interpreter.
python3-PyQt4 should work (theoretically), but has seen very little real- world use or testing yet. Please file bugs.
-- Rex
Rex Dieter wrote:
Stanislav Ochotnicky wrote:
On 10/20/2010 02:38 PM, Neal Becker wrote:
Has anyone attempted a pyqt for python3?
I did. It failed (not on Fedora though and I didn't investigate at the time). I seem to remember some symbol problems with QString class that was reported when I tried to import PyQt from python3 interpreter.
python3-PyQt4 should work (theoretically), but has seen very little real- world use or testing yet. Please file bugs.
-- Rex
Only for f14+, correct?
Neal Becker wrote:
Rex Dieter wrote:
Stanislav Ochotnicky wrote:
On 10/20/2010 02:38 PM, Neal Becker wrote:
Has anyone attempted a pyqt for python3?
I did. It failed (not on Fedora though and I didn't investigate at the time). I seem to remember some symbol problems with QString class that was reported when I tried to import PyQt from python3 interpreter.
python3-PyQt4 should work (theoretically), but has seen very little real- world use or testing yet. Please file bugs.
Only for f14+, correct?
yes (though I think we could also theoretically provide f13 builds too, for good cause)
-- Rex
On 10/20/2010 04:11 PM, Rex Dieter wrote:
Stanislav Ochotnicky wrote:
On 10/20/2010 02:38 PM, Neal Becker wrote:
Has anyone attempted a pyqt for python3?
I did. It failed (not on Fedora though and I didn't investigate at the time). I seem to remember some symbol problems with QString class that was reported when I tried to import PyQt from python3 interpreter.
python3-PyQt4 should work (theoretically), but has seen very little real- world use or testing yet. Please file bugs.
FYI I found solution to the problem I was encountering when using PyQt4 with Python 3.x.
PyQt 4.6+ uses new API for QString and QVariant when run on Python 3.x. That has to do with unicode string being default in Python 3.x.
Therefore you can replace all occurrences of QString with ordinary python strings.
For my use-case I wanted to have the same code for Python 2.x/3.x so I did this:
try: from PyQt4.QtCore import QString except ImportError: # we are using Python3 so QString is not defined QString = type("")
On Thu, Oct 21, 2010 at 02:45:38PM +0200, Stanislav Ochotnicky wrote:
On 10/20/2010 04:11 PM, Rex Dieter wrote:
Stanislav Ochotnicky wrote:
On 10/20/2010 02:38 PM, Neal Becker wrote:
Has anyone attempted a pyqt for python3?
I did. It failed (not on Fedora though and I didn't investigate at the time). I seem to remember some symbol problems with QString class that was reported when I tried to import PyQt from python3 interpreter.
python3-PyQt4 should work (theoretically), but has seen very little real- world use or testing yet. Please file bugs.
FYI I found solution to the problem I was encountering when using PyQt4 with Python 3.x.
PyQt 4.6+ uses new API for QString and QVariant when run on Python 3.x. That has to do with unicode string being default in Python 3.x.
Therefore you can replace all occurrences of QString with ordinary python strings.
For my use-case I wanted to have the same code for Python 2.x/3.x so I did this:
try: from PyQt4.QtCore import QString except ImportError: # we are using Python3 so QString is not defined QString = type("")
Thanks for sharing this! I've added a page on python.org's wiki for porting tips for python3 and pyqt:
http://wiki.python.org/moin/PortingPythonToPy3k/PyQt4
Feel free to add or correct information there. I'm not certain if it still does but in the past the python wiki allowed anonymous edits if you don't want to make an account.
-Toshio
Toshio Kuratomi wrote:
Thanks for sharing this! I've added a page on python.org's wiki for porting tips for python3 and pyqt:
http://wiki.python.org/moin/PortingPythonToPy3k/PyQt4
Feel free to add or correct information there. I'm not certain if it still does but in the past the python wiki allowed anonymous edits if you don't want to make an account.
Is it possible to use:
import sip sip.setapi('QString', 1)
to continue using the original QString on Python 3?
Kevin Kofler
On 10/22/2010 03:51 PM, Kevin Kofler wrote:
Toshio Kuratomi wrote:
Thanks for sharing this! I've added a page on python.org's wiki for porting tips for python3 and pyqt:
http://wiki.python.org/moin/PortingPythonToPy3k/PyQt4
Feel free to add or correct information there. I'm not certain if it still does but in the past the python wiki allowed anonymous edits if you don't want to make an account.
Is it possible to use:
import sip sip.setapi('QString', 1)
to continue using the original QString on Python 3?
Duh'...it is possible :-) Oh well. But I guess it's better to start using the new API before it's deprecated completely...
On Fri, Oct 22, 2010 at 04:47:21PM +0200, Stanislav Ochotnicky wrote:
On 10/22/2010 03:51 PM, Kevin Kofler wrote:
Toshio Kuratomi wrote:
Thanks for sharing this! I've added a page on python.org's wiki for porting tips for python3 and pyqt:
http://wiki.python.org/moin/PortingPythonToPy3k/PyQt4
Feel free to add or correct information there. I'm not certain if it still does but in the past the python wiki allowed anonymous edits if you don't want to make an account.
Is it possible to use:
import sip sip.setapi('QString', 1)
to continue using the original QString on Python 3?
Duh'...it is possible :-) Oh well. But I guess it's better to start using the new API before it's deprecated completely...
Thanks to both of you for that: python wiki page has been updated.
-Toshio