Window.Read with timeout=0 is same as ReadNonBlocking

This commit is contained in:
MikeTheWatchGuy 2018-10-22 10:43:32 -04:00
parent 2733d80b34
commit e96b914680
1 changed files with 2 additions and 0 deletions

View File

@ -2748,6 +2748,8 @@ class Window:
self.TKroot.quit() # kick the users out of the mainloop self.TKroot.quit() # kick the users out of the mainloop
def Read(self, timeout=None, timeout_key='_timeout_'): def Read(self, timeout=None, timeout_key='_timeout_'):
if timeout == 0:
return self.ReadNonBlocking()
self.Timeout = timeout self.Timeout = timeout
self.TimeoutKey = timeout_key self.TimeoutKey = timeout_key
self.NonBlocking = False self.NonBlocking = False