def __init__(self, parent, title): """ Main Window Frame for wxSQL """ wx.Frame.__init__(self, parent, title=title) self.SetClientSize((600, 450)) self._db = DB() self.create_panels() self.create_menu() self.Show(True)
def main(): app = wx.App(False) frame = TestFrame(None, title="Results Table", size=(600, 400)) panel = ResultTablePanel(frame) frame.Show(True) from app.db.mysql import DB db = DB() cursor = db.conn.cursor() cursor.execute('SELECT * FROM `test`.`person`') description = cursor.description data = cursor.fetchall() cursor.close() panel.set_data(description, data) app.MainLoop()