I'm currently trying to print a table of data gathered from a database onto a GUI in tkinter, at the moment I'm using tabulate which runs fine in console, but as soon as I try to set the table as text as print as a label the table skews and the values are not aligned. I am still new to tkinter and so my code is by far not the most efficient or effective, any ideas on why this is happening or a way around?
order = (key_1,name_1,price_1,quantity_1,total_1)
table.append(order)
count +=1
print_table = (tabulate(table,headers=headers,tablefmt= "rst"))
c.fetchall()
conn.commit()
conn.close()
label_table = tk.Label(self,text=print_table)
label_table.pack()
Expected Result: !file:///var/folders/59/89rdtwpd4vnf6pv7pbd3l60m0000gn/T/com.apple.Safari/WebKitDropDestination-rwh55dGn/Screen%20Shot%202019-02-03%20at%2011.49.29%20PM.png
Actual Result:
!file:///var/folders/59/89rdtwpd4vnf6pv7pbd3l60m0000gn/T/com.apple.Safari/WebKitDropDestination-tZziKT9D/Screen%20Shot%202019-02-03%20at%2011.47.15%20PM.png