[PyQt] PyQt4 changes __str__ of numpy??

Ole Streicher ole-usenet-spam at gmx.net
Fri Aug 28 11:24:27 BST 2009


Hi,

I experienced, that

import numpy
import PyQt4.QtCore

print(numpy.float64(1.2).__str__())
app = PyQt4.QtCore.QCoreApplication([])
print(numpy.float64(1.2).__str__())

results in a (partly) localized output string in the second
printout. With LANG=de_DE.UTF-8 environment setting, I get

1.2
1,2

as output. The __str__ method is used f.e. in the csv module, and
therefore the csv output will result in a wrong output format that
cannot be parsed pack to numbers.

Is this a bug in PyQt4 or a feature?

Best regards

Ole



More information about the PyQt mailing list