[PyKDE] PyQt: Something wrong with QTextStream.read()

Parzival Herzog parzp at shaw.ca
Sat Dec 18 23:55:46 GMT 2004

The script below segfaults at line 6. Does anyone have a clue why
and if there may be a workaround?  I need to use a QTextStream
in my PyQt program, for the `QTextStream >> QMainWindow'.
The writing direction seems to work properly. 
1 from qt import *
2 woof = "WOOF\n"
3 print woof
4 woof_ts = QTextStream(woof, IO_ReadOnly)
5 print woof
6 rewoof = woof_ts.read()
7 print rewoof
[parz at lobsang py]$ python woofy.py


Segmentation fault
[parz at lobsang py]$

Parzival Herzog

More information about the PyQt mailing list