On Monday 16 October 2006 7:24 am, Simon Edwards wrote: > Hi Phil, > > ------------------------- > #!/usr/bin/env python > > from PyQt4 import QtCore > > def main(): > > f = QtCore.QFile("Stream_test.txt") > f.open(QtCore.QIODevice.WriteOnly) > > stream = QtCore.QTextStream(f) > num = 80 > stream << "This is my number " << num << "." > f.close() > > main() > --------------------------- > > Output is "This is my number 1.", while I had expected "This is my number > 80.".
It's treating the int as a bool. PyQt has never supported basic types and QTextStream - but I've added limited support in the latest PyQt4 snapshot. There are easier ways to do this in standard Python. Phil _______________________________________________ PyKDE mailing list PyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde