On Tue, 12 Jan 2010 23:38:20 + (UTC), Richard Parker
wrote:
> I think you are right, but how can I achieve the same functionality with
> Python 3.1.1, as I do with Python 2.6? (i.e., left(5).toUpper()) for the
> "str" that's returned by Python 3.1.1?
The change you see is PyQt API v2 versus
etrius Cassidy"
To: "Richard Parker"
Cc: "PYQT"
Sent: Tuesday, January 12, 2010 2:49:41 PM GMT -08:00 US/Canada Pacific
Subject: Re: [PyQt] Different Behavior between Python 2.6 and Python
3.1.1
I think .text() in Python 3.1 with PyQt4 is returning a python 'str
Python 3.1.1 and I'm not
sure how to do so. Any help will be appreciated.
-rich-
- Original Message -
From: "Demetrius Cassidy"
To: "Richard Parker"
Cc: "PYQT"
Sent: Tuesday, January 12, 2010 2:49:41 PM GMT -08:00 US/Canada Pacific
Subject: Re
--- Original Message -
From: "Demetrius Cassidy"
To: "Richard Parker"
Cc: "PYQT"
Sent: Tuesday, January 12, 2010 2:49:41 PM GMT -08:00 US/Canada Pacific
Subject: Re: [PyQt] Different Behavior between Python 2.6 and Python 3.1.1
I think .text() i
I think .text() in Python 3.1 with PyQt4 is returning a python 'str'
object, instead of a QString. Try and do type(self.ui.txtText.text())
and see what it returns.
Richard Parker wrote:
I have the following statement in an application that runs fine with
Python 2.6 (and PyQt):
text =
I have the following statement in an application that runs fine with Python 2.6
(and PyQt):
text = self.ui.txtText.text().left(5).toUpper()
In Python 3.1.1 (with PyQt), I get the following error for the first statement:
" text = self.ui.txtText.text().left(5).toUpper()
AttributeError: 'str'