Renamed return value from Read call from button to event... EVERYWHERE
This commit is contained in:
parent
43526e0182
commit
c79a8772cc
86 changed files with 7992 additions and 12709 deletions
|
@ -21,12 +21,12 @@ window = sg.Window('Chat window', default_element_size=(30, 2), font=('Helvetica
|
|||
|
||||
# ---===--- Loop taking in user input and using it --- #
|
||||
while True:
|
||||
(button, value) = window.Read()
|
||||
if button is 'SEND':
|
||||
(event, value) = window.Read()
|
||||
if event is 'SEND':
|
||||
query = value['query'].rstrip()
|
||||
# EXECUTE YOUR COMMAND HERE
|
||||
print('The command you entered was {}'.format(query))
|
||||
elif button is None or button is 'EXIT': # quit if exit button or X
|
||||
elif event is None or event == 'EXIT': # quit if exit button or X
|
||||
break
|
||||
sys.exit(69)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue