python tkinter creating new lines from sql -


hey i've got problem cant seem find solution for, i'm trying data sql database i've managed fine here problem prints on 1 line , goes off screen, if knows solution huge thanks, reference i've added bit need rest of necessary code in program.

cursor.execute("select * staff") fetched_duties = cursor.fetchall()  self.label_2 = label(self, text="%s" % fetched_duties) 

the tkinter label object doesn't perform text wrapping, if representation of list returned cursor.fetchall() long will, have seen, drop off right-hand side of whatever window appears in.

try like

self.label_2 = label(self, text="%s" % "\n".join(fetched_duties)) 

and see whether multiple lines.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -