ComputerKeeper/main.py

46 lines
1.2 KiB
Python
Raw Normal View History

2022-08-19 02:17:43 +00:00
"""This is the main function"""
import PySimpleGUI as sg
# Define the window's contents
2022-08-26 01:10:43 +00:00
layout = [[sg.Table([["word","Yes"]],["Serial Number","Brand","Grade","Name"])],
[sg.Text("Serial Number")],
[sg.Input(key='-INPUT-')],
[sg.Text("Brand")],
[sg.Input(key='-INPUT-')],
[sg.Text("Grade")],
[sg.Input(key='-INPUT-')],
[sg.Text("Name")],
2022-08-19 02:17:43 +00:00
[sg.Input(key='-INPUT-')],
[sg.Text(size=(40,1), key='-OUTPUT-')],
2022-08-26 01:10:43 +00:00
[sg.Button('Check In'), sg.Button('Check Out')]]
2022-08-19 02:17:43 +00:00
def main():
"""Core of ComputerKeeper - The Main Application."""
print("hello, world!")
# Create the window
window = sg.Window('Window Title', layout)
# Display and interact with the Window using an Event Loop
while True:
event, values = window.read()
# See if user wants to quit or window was closed
if event == sg.WINDOW_CLOSED or event == 'Quit':
break
# Output a message to the window
window['-OUTPUT-'].update('Hello ' + values['-INPUT-'] + "! Thanks for trying PySimpleGUI")
# Finish up by removing from the screen
window.close()
if __name__ == "__main__":
main()