From c3c25bfd83f6eedaeda01eebe2082aad2ee72157 Mon Sep 17 00:00:00 2001 From: MikeTheWatchGuy Date: Sat, 18 May 2019 07:46:20 -0400 Subject: [PATCH] New Hello World Demos --- DemoPrograms/Demo_Hello_World.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 DemoPrograms/Demo_Hello_World.py diff --git a/DemoPrograms/Demo_Hello_World.py b/DemoPrograms/Demo_Hello_World.py new file mode 100644 index 00000000..eb7ee429 --- /dev/null +++ b/DemoPrograms/Demo_Hello_World.py @@ -0,0 +1,15 @@ +import PySimpleGUI as sg + +""" + Oh yes, the classic "Hello World". The problem is that you + can do it so many ways using PySimpleGUI +""" + +sg.PopupNoButtons('Hello World') # the single line + +sg.Window('Hello world', [[sg.Text('Hello World')]]).Read() # single line using a real window + +# This is a "Traditional" PySimpleGUI window code. First make a layout, then a window, the read it +layout = [[sg.Text('Hello World')]] +window = sg.Window('Hello world', layout) +event, values = window.Read()