FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 10-20-2010, 12:38 PM
Neal Becker
 
Default PyQt + python3?

Has anyone attempted a pyqt for python3?

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Wed Oct 20 15:30:02 2010
Return-path: <desktop-bounces@lists.fedoraproject.org>
Envelope-to: tom@linux-archive.org
Delivery-date: Wed, 20 Oct 2010 14:47:46 +0300
Received: from bastion02.fedoraproject.org ([209.132.181.3]:43750 helo=bastion.fedoraproject.org)
by s2.java-tips.org with esmtp (Exim 4.69)
(envelope-from <desktop-bounces@lists.fedoraproject.org>)
id 1P8X90-0006dd-NL
for tom@linux-archive.org; Wed, 20 Oct 2010 14:47:46 +0300
Received: from lists.fedoraproject.org (collab1.vpn.fedoraproject.org [192.168.1.21])
by bastion02.phx2.fedoraproject.org (Postfix) with ESMTP id E0B8F110638;
Wed, 20 Oct 2010 12:43:02 +0000 (UTC)
Received: from collab1.fedoraproject.org (localhost.localdomain [127.0.0.1])
by lists.fedoraproject.org (Postfix) with ESMTP id 8C6BC3267A2;
Wed, 20 Oct 2010 12:43:02 +0000 (UTC)
X-Original-To: desktop@lists.fedoraproject.org
Delivered-To: desktop@lists.fedoraproject.org
Received: from smtp-mm3.fedoraproject.org (smtp-mm3.fedoraproject.org
[152.46.7.226])
by lists.fedoraproject.org (Postfix) with ESMTP id 59E373267A2
for <desktop@lists.fedoraproject.org>;
Wed, 20 Oct 2010 12:43:01 +0000 (UTC)
Received: from mail-bw0-f45.google.com (mail-bw0-f45.google.com
[209.85.214.45])
by smtp-mm3.fedoraproject.org (Postfix) with ESMTP id C0A6537D4E
for <desktop@lists.fedoraproject.org>;
Wed, 20 Oct 2010 12:43:00 +0000 (UTC)
Received: by bwz6 with SMTP id 6so2567984bwz.32
for <desktop@lists.fedoraproject.org>;
Wed, 20 Oct 2010 05:43:00 -0700 (PDT)
Received: by 10.204.126.167 with SMTP id c39mr7038376bks.125.1287578579846;
Wed, 20 Oct 2010 05:42:59 -0700 (PDT)
Received: from valhalla.rhi.hi.is (valhalla.rhi.hi.is [130.208.69.191])
by mx.google.com with ESMTPS id d27sm127727bkw.14.2010.10.20.05.42.58
(version=SSLv3 cipher=RC4-MD5); Wed, 20 Oct 2010 05:42:59 -0700 (PDT)
Message-ID: <4CBEE3D1.9040702@gmail.com>
Date: Wed, 20 Oct 2010 12:42:57 +0000
From: =?UTF-8?B?IkrDs2hhbm4gQi4gR3XDsG11bmRzc29uIg==?=
<johannbg@gmail.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc13 Thunderbird/3.1.4
MIME-Version: 1.0
To: desktop@lists.fedoraproject.org
Subject: OpenOffice or LibreOffice?
References: <4CB8EED2.1090508@redhat.com> <1287216444.2139.69.camel@localhost.localdomain> <20101016132012.GB25682@wolff.to> <1287242789.15428.23.camel@localhost.localdomain > <20101016161226.GA3711@wolff.to> <1287247330.15428.50.camel@localhost.localdomain > <1287250465.4036.152.camel@hal900.localdomain> <1287267308.23152.3.camel@planemask> <1287303775.15428.107.camel@localhost.localdomai n> <4CBE0126.5030605@redhat.com>
<1287553816.3625.7.camel@localhost.localdomain>
In-Reply-To: <1287553816.3625.7.camel@localhost.localdomain>
X-BeenThere: desktop@lists.fedoraproject.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: Discussions about development for the Fedora desktop
<desktop@lists.fedoraproject.org>
List-Id: Discussions about development for the Fedora desktop
<desktop.lists.fedoraproject.org>
List-Unsubscribe: <https://admin.fedoraproject.org/mailman/listinfo/desktop>,
<mailto:desktop-request@lists.fedoraproject.org?subject=unsubscrib e>
List-Archive: <http://lists.fedoraproject.org/pipermail/desktop>
List-Post: <mailto:desktop@lists.fedoraproject.org>
List-Help: <mailto:desktop-request@lists.fedoraproject.org?subject=help>
List-Subscribe: <https://admin.fedoraproject.org/mailman/listinfo/desktop>,
<mailto:desktop-request@lists.fedoraproject.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: desktop-bounces@lists.fedoraproject.org
Errors-To: desktop-bounces@lists.fedoraproject.org

Perhaps I'm the only one that is wondering if we are we going to stick
with OpenOffice as our default or make LibreOffice our default and
migrate our users to LibreOffice?

It would be good to get the desktop members view on this for future
deployments.

JBG
--
desktop mailing list
desktop@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/desktop
 
Old 10-20-2010, 12:47 PM
Stanislav Ochotnicky
 
Default PyQt + python3?

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 <sochotnicky@redhat.com>
Associate Software Engineer - Base Operating Systems Brno

PGP: 71A1677C
Red Hat Inc. http://cz.redhat.com

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-20-2010, 02:11 PM
Rex Dieter
 
Default PyQt + python3?

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


--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-20-2010, 06:58 PM
Neal Becker
 
Default PyQt + python3?

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?

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-20-2010, 07:27 PM
Rex Dieter
 
Default PyQt + python3?

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

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-21-2010, 12:45 PM
Stanislav Ochotnicky
 
Default PyQt + python3?

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("")



--
Stanislav Ochotnicky <sochotnicky@redhat.com>
Associate Software Engineer - Base Operating Systems Brno

PGP: 71A1677C
Red Hat Inc. http://cz.redhat.com

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-21-2010, 03:49 PM
Toshio Kuratomi
 
Default PyQt + python3?

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
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-22-2010, 01:51 PM
Kevin Kofler
 
Default PyQt + python3?

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

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-22-2010, 02:47 PM
Stanislav Ochotnicky
 
Default PyQt + python3?

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...

--
Stanislav Ochotnicky <sochotnicky@redhat.com>
Associate Software Engineer - Base Operating Systems Brno

PGP: 71A1677C
Red Hat Inc. http://cz.redhat.com

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-22-2010, 05:14 PM
Toshio Kuratomi
 
Default PyQt + python3?

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
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 

Thread Tools




All times are GMT. The time now is 10:37 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org