PySimpleGUI范例
import PySimpleGUI as sg # Part 1 - The import# Define the window's contents
layout = [, # Part 2 - The Layout
,
]
# Create the window
window = sg.Window('Window Title', layout) # Part 3 - Window Defintion
# Display and interact with the Window
event, values = window.read() # Part 4 - Event loop or Window.read call
# Do something with the information gathered
print('Hello', values, "! Thanks for trying PySimpleGUI")
# Finish up by removing from the screen
window.close()
页:
[1]