(self, timeout=None)
return True
return False if the timeout occured
return False if the timeout occured
return False if the timeout occured
def wait(self, timeout=None):
		""" return False if the timeout occured"""
		if self.hProcess is None:
			return True
		starttime=time.time()
		while True:
			try:
				res=ctypes.windll.kernel32.WaitForSingleObject(self.hProcess, DWORD(1))# not INFINITE to be able to interrupt it !
				if res!=WAIT_TIMEOUT:
					break
				if timeout is not None and time.time()-starttime>timeout:
					return False
			except KeyboardInterrupt:
				break
		return True
def wait ( self , timeout = None ) : if self . hProcess is None : return True starttime = time . time ( ) while True : try : res = ctypes . windll . kernel32 . WaitForSingleObject ( self . hProcess , DWORD ( 1 ) ) # not INFINITE to be able to interrupt it ! if res != WAIT_TIMEOUT : break if timeout is not None and time . time ( ) - starttime > timeout : return False except KeyboardInterrupt : break return True