from ast import Import
from tkinter import Tk
from tkinter import Tk
import PySimpleGUI as sg
class comparador:
def main():
layout = [
[sg.Text("folha 1", justification='left'), sg.Input(key='1')],
[sg.Text("folha 2", justification='left'), sg.Input(key='2')],
[sg.Push()],
[sg.Button("Detetar", key='detetar')]
]
window = sg.Window("Main Window", layout)
while True:
event, values = window.read()
if event == sg.WIN_CLOSED:
break
if event == "detetar":
window.close()
folha1 = '1'.split()
folha2 = '2'.split()
layout = [[sg.Text(list(set(folha1).symmetric_difference(set(folha2))))]]
resposta = sg.Window("Second Window", layout, resizable=True)
choice = None
while True:
event, values = resposta.read()
if event == sg.WIN_CLOSED:
break
if __name__ == "__main__":
main()
Blockquote