Ver Mensaje Individual
  #3 (permalink)  
Antiguo 22/06/2011, 15:15
poeta3d
 
Fecha de Ingreso: diciembre-2010
Mensajes: 162
Antigüedad: 13 años, 4 meses
Puntos: 1
Pregunta Respuesta: problemas con sqlite y wxpython

bueno probe esto y me da error
self.Bind(wx.EVT_BUTTON,self.onboton)

def onboton(self,event):

x=self.textocodigo.GetValue()
conexion=sqlite3.connect("MOTOS.S3DB")
cursor=conexion.cursor()
t=(x, )
cursor.execute("SELECT CODIGO,PRECIO FROM MOTOS WHERE DETALLE=?",t)
for row in cursor:
self.textocodigo2.SetValue(row[0])
dat1=self.textocodigo3.SetValue(row[1])
dat=self.textocodigo5.GetValue()

dattotal=float(dat)*dat1
print dattotal
el error es invalid literal for float():4,15
no se que hacer ya. por favor que alguien me ayude