Major update of all demo programs to use new PEP8 bindings, etc
This commit is contained in:
parent
3f7c87c562
commit
7f52778bcc
307 changed files with 19546 additions and 3297 deletions
|
@ -1,17 +1,14 @@
|
|||
#!/usr/bin/env python
|
||||
import sys
|
||||
if sys.version_info[0] >= 3:
|
||||
import PySimpleGUI as sg
|
||||
else:
|
||||
import PySimpleGUI27 as sg
|
||||
import PySimpleGUI as sg
|
||||
|
||||
layout = [[sg.Text("Hold down a key")],
|
||||
[sg.Button("OK")]]
|
||||
|
||||
window = sg.Window("Realtime Keyboard Test", return_keyboard_events=True, use_default_focus=False).Layout(layout)
|
||||
window = sg.Window("Realtime Keyboard Test", layout, return_keyboard_events=True,
|
||||
use_default_focus=False)
|
||||
|
||||
while True:
|
||||
event, values = window.Read(timeout=0)
|
||||
event, values = window.read(timeout=0)
|
||||
|
||||
if event == "OK":
|
||||
print(event, values, "exiting")
|
||||
|
@ -23,3 +20,5 @@ while True:
|
|||
print(event)
|
||||
elif event is None:
|
||||
break
|
||||
|
||||
window.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue