Complete Python Database Project with sqlite3
Here You can learn how to load sqlite3 data into datagrid using Python . * How to Insert *How to Delete *How to Save *How to Load *Exit button code and *How to search (Screen Shot) **************************************** import os import wx import wx.xrc import wx.grid import sqlite3 import re import string import gettext cwd = os.path.abspath(os.curdir) def connect(): con_str = cwd + '/folder/Test.db' cnn = sqlite3.connect(con_str) return cnn cnn.close() def data_rows(): con = connect() cur = con.cursor() cur.execute("SELECT * FROM DATA") rows = cur.fetchall() i = 0 for r in rows: i+= 1 return i def single_quote_remover(text): return text.replace ("'","/") class Database ( wx.Frame ): def __init__( self, parent ): wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title =
Comments
Post a Comment