Use ==/!= to compare str literals
This commit is contained in:
parent
6680820360
commit
b2ba8acb34
26 changed files with 52 additions and 60 deletions
|
@ -28,7 +28,7 @@ def StatusOutputExample():
|
|||
# This is the code that reads and updates your window
|
||||
event, values = window.Read(timeout=10)
|
||||
window.FindElement('output').Update('{:02d}:{:02d}.{:02d}'.format((i // 100) // 60, (i // 100) % 60, i % 100))
|
||||
if event == 'Quit' or event is None:
|
||||
if event in ('Quit', None):
|
||||
break
|
||||
if event == 'LED On':
|
||||
print('Turning on the LED')
|
||||
|
@ -63,9 +63,9 @@ def RemoteControlExample():
|
|||
while (True):
|
||||
# This is the code that reads and updates your window
|
||||
event, values = window.Read(timeout=0, timeout_key='timeout')
|
||||
if event is not 'timeout':
|
||||
if event != 'timeout':
|
||||
print(event)
|
||||
if event == 'Quit' or event is None:
|
||||
if event in ('Quit', None):
|
||||
break
|
||||
|
||||
window.Close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue