On Tue, 12 Jan 2010 23:38:20 + (UTC), Richard Parker
r.richardpar...@comcast.net 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
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'
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
To: Richard Parker r.richardpar...@comcast.net
Cc: PYQT pyqt@riverbankcomputing.com
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
-
- Original Message -
From: Demetrius Cassidy dcassid...@mass.rr.com
To: Richard Parker r.richardpar...@comcast.net
Cc: PYQT pyqt@riverbankcomputing.com
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
@riverbankcomputing.com
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'
object, instead of a QString. Try and do type