From: Milton i. <min...@gm...> - 2005-06-16 00:46:10
|
hello: they know I am rescuing values from the following table: CREATE TABLE afp ( nombre_afp varchar(75) NOT NULL, razon_social_afp varchar(75), porcentaje_afp float8, CONSTRAINT pk_afp PRIMARY KEY (nombre_afp) ) by means of the console psql, I make the following thing: remunex=3D# select * from afp; nombre_afp | razon_social_afp | porcentaje_afp ------------+------------------+---------------- G | | 1.9 AFP | AFP S.A. | 1.7 GT | | 2.6 (3 filas) it is to say float's are ok!=20 now, I make the following thing from python def lista_datos(self): self.modelo.clear() sql=3D"""SELECT nombre_afp,razon_social_afp, porcentaje_afp FROM afp ORDER BY nombre_afp """ self.cursor.execute(sql) r=3Dself.cursor.fetchall() print r and the result is the following one: [['AFP', 'AFP S.A.', 1.0], ['G', '', 1.0], ['GT', '', 2.0]] and... aca is the error, if they pay attention the part decimal of float is in zero, somebody can help me with this... could be some configuration of global variables....esto before did not pass (python to me 2.3.5) and now with python2.4 it is happening to me, salu2! --=20 Milton Inostroza Aguilera |