Hi;
I'm trying to display the contents of 02 text files in a Tkinter (Text) widget, but I didn'tt arrived.
File contents (loc1.txt):
Content of the second text file (loc2.txt):
Here is the code I made to display the contents of a text file:
here is the image of the desired concept:
thanks or help
I'm trying to display the contents of 02 text files in a Tkinter (Text) widget, but I didn'tt arrived.
File contents (loc1.txt):
Quote:21/06/18 -0.7
22/06/18 -0.5
06/07/18 -0.7
13/07/18 -0.6
20/07/18 -0.3
27/07/18 -0.5
10/08/18 -1.2
17/08/18 -0.5
24/08/18 -0.3
21/09/18 -0.2
28/09/18 -0.4
17/10/18 -0.1
Content of the second text file (loc2.txt):
Quote:21/06/18 -0.7
22/06/18 -0.5
06/07/18 -0.8
13/07/18 -0.7
20/07/18 -0.3
27/07/18 -0.7
10/08/18 -1.0
17/08/18 -0.5
24/08/18 -0.3
21/09/18 -0.2
28/09/18 -0.5
17/10/18 -0.3
Here is the code I made to display the contents of a text file:
sous_generalites=Frame(generalites,bg='powder blue') sous_generalites.pack(side=BOTTOM) s_generalites= Scrollbar(sous_generalites) T_generalites= Text(sous_generalites,bg='powder blue',width=750,height=550,font=('arial',14,'bold'),padx=20) s_generalites.pack(side=RIGHT, fill=Y) T_generalites.pack(side=LEFT, fill=Y) s_generalites.config(command=T_generalites.yview) T_generalites.config(yscrollcommand=s_generalites.set) filename =('archives/loc1.txt') fichier = open(filename, "r") content_generalites= fichier.read() fichier.close() T_generalites.insert(END, content_generalites)Each of the two files has two columns (the first column is the same for both files, it represents the date)
here is the image of the desired concept:
![[Image: p5pt.jpg]](https://zupimages.net/up/18/44/p5pt.jpg)
thanks or help