from tkinter import *
from tkinter.messagebox import showinfo
def output():
yield 'The %s line' % ('first')
yield '\n'
yield 'The %s line' % ('second')
def reply():
showinfo(title='Log size', message=(list(output())))
window = Tk()
button = Button(window, text='Get info', command=reply)
button.pack()
window.mainloop()
which returns this.
How can I make the output looks better as:
The first line
The second line
I have tried to get message as list(i for i in output()), but the result is the same.