Hi,
ich versuche gerade eine Ausgabe aus einer importierten Datei in einem
definierten Bereich auszugeben...
Hier die zweir files, wie ich das versucht habe.
1 | #Main.py
|
2 | fenster.resizable(width=0,height=0)
|
3 | text1 = Text(fenster, height=20, width=30)
|
4 |
|
5 | photo=PhotoImage(file='flaggs2.png')
|
6 | text1.insert(END,'\n')
|
7 | text1.image_create(END, image=photo)
|
8 | text1.config(state=DISABLED)
|
9 | text1.pack(side=LEFT)
|
10 |
|
11 | text2 = Text(fenster, height=20, width=50)
|
12 | scroll = Scrollbar(fenster, command=text2.yview)
|
13 | text2.configure(yscrollcommand=scroll.set)
|
14 | text2.tag_configure('bold_italics', font=('Arial', 12, 'bold', 'italic'))
|
15 | text2.tag_configure('big', font=('Verdana', 20, 'bold'))
|
16 | text2.insert(END,'\nhier steht der erste Text\n', 'big')
|
17 | text2.insert(END, 'und hier der zweite\n', 'follow')
|
18 | text2.pack(side=LEFT)
|
19 | scroll.pack(side=RIGHT, fill=Y)
|
1 | # test-import.py
|
2 |
|
3 | text2.insert(END, 'text aus importierter Datei 2\n', 'follow')
|