Python:PySimpGUI

De BrapciWiki
Ir para navegação Ir para pesquisar

PySimpGUI

Para instalar a biblioteca

pip install PySimpleGUI

Documentação: [https://www.pysimplegui.org/en/latest/]

== Exemplo

from PySimpleGUI import PySimpleGUI as sg
sg.theme('Reddit')
layout = [
   [sg.Text('Usuário'),sg.Input(key='user')],
   [sg.Text('Senha'), sg.Input(key='pass', password_char='*')],
   [sg.Button('Entrar')]
]
Janela = sg.Window('Login',layout)
while True:
   eventos, valores = Janela.read()
   if eventos == sg.WINDOW_CLOSED:
       break;