Function in database
con=sqlite3.connect("customer.db")
cur = con.cursor()
cur.execute("SELECT * FROM customer")
row = cur.fetchall()
con.close()
return row
Display
customerlist = Listbox(DataFrameRIGHT,width=41,height=16,font=('arial',12,'bold'), yscrollcommand=scrollbar.set)
customerlist.bind('<<ListboxSelect>>',CustomerRec)
customerlist.grid(row=0,column=0,padx=8)
scrollbar.config(command = customerlist.yview)
def DisplayData():
customerlist.delete(0,END)
for row in cstDatabase_BackEnd.viewData():
customerlist.insert(END,row,str(""))
So Displayed data is not pretty and to do that there is tabulate i guess but i cant figure out how to pass this data and get it to work. Can someone help in getting either tabulate or any other method to display data more tidily?