Creating a simple graphical user interface (GUI) that works across multiple platforms can be complicated. But it doesn't have to be that way. You can use Python and the PySimpleGUI package to create nice-looking user interfaces that you and your users will enjoy! PySimpleGUI is a new Python GUI library that has been gaining a lot of interest recently.
PySimpleGUI is a Python package that enables Python programmers of all levels to create GUIs. You specify your GUI window using a "layout" which contains widgets (they're called "Elements" in PySimpleGUI). Regardless of the O.S [Windows,Mac or Linux], on your python interpreter, we will install the package.
Pip install PySimpleGUI
1. import PySimpleGUI as sg
2. sg.Window(title="Hello Amigo", layout=[[]], margins=(200,100)).read()
1. import PySimpleGUI as sg
2.
3. layout = [
4. [sg.Text("Hello from silvans")],
5. [sg.Button("Hi!")]
6.]
7.
8.window = sg.Window("Demo", layout, margins=(200,100))
9.
10.while True:
11. event, values = window.read()
12. if event == "Hi!" or event == sg.WIN_CLOSED:
13. break
14.window.close()