Código Python:
Ver original
class milogin(wx.Frame): def __init__(self,parent): wx.Frame.__init__(self,parent,title="Rellene sus datos",size=(300,200)) self.Show() self.SetBackgroundColour("orange") texto=wx.StaticText(self,label="Nombre de Usuario",pos=(30,40)) self.entrada=wx.TextCtrl(self,pos=(150,40)) texto2=wx.StaticText(self,label="Pass",pos=(30,70)) self.entrada2=wx.TextCtrl(self,pos=(150,70),style=wx.TE_PASSWORD) boton=wx.Button(self,pos=(150,100),label="Ingresar") self.Bind(wx.EVT_BUTTON, self.onboton) def onboton(self,event): x=self.entrada.GetValue() y=self.entrada2.GetValue() conexion=sqlite3.connect("login.S3DB") cursor=conexion.cursor() t=(x,y ) cursor.execute("INSERT INTO milogin (nombredeusuario,password) VALUES (?,?) ",t) cursor.execute("SELECT * FROM milogin") frame=frame2(self) frame.Show() conexion.commit() class frame2(wx.Frame): def __init__(self,parent): wx.Frame.__init__(self,None,size=(500,400)) app=wx.App() m=milogin(None) app.MainLoop()