No no!! wait!
Look at this:
def show():
import sqlite3 as db
conn = db.connect('sarah.db')
conn.row_factory = db.Row
cursor = conn.cursor()
cursor.execute('SELECT * FROM colors;')
rows = cursor.fetchall()
for row in rows:
print ('%s' % (row['colorname']))
data_str = (row['colorname']) + '\n'
lbl['text'] = data_str
conn.commit()
cursor.close()
conn.close()
I think the problem is related into the "for row in rows:" part.
With the print line as we see, all colornames i have inserted to the table will be printed in the terminal!
But with the data_str = (row['colorname']) + '\n'
line i have typed, i get only the last word i have added to the table.
How should i change this line?