On 2/11/2008 7:22 AM, Tiago Maluta wrote:

Following Assistant (for C++) documentation about QString split method I saw:

str = "Now: this sentence fragment.";
list = str.split(QRegExp("\\b"));
// list: [ "", "Now", ": ", "this", " ", "sentence", " ", "fragment", "." ]

Not really... there's a missing QString() construction somewhere.

Now, I with python I tried, a simple example:


 line = p.readline()
 sline = line.split(QtCore.QRegExp("[A-Z]+"))

With this code I got: TypeError: PyQt expected a character buffer object.

It would work if you first converted the output of readline() to QString.
--
Giovanni Bajo
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to