@retry(exception=psutil.NoSuchProcess, logfun=None, timeout=GLOBAL_TIMEOUT, interval=0.001)
def wait_for_pid(pid):
 psutil.Process(pid)
 if WINDOWS:
  time.sleep(0.01)

@ retry ( exception = psutil . NoSuchProcess , logfun = None , timeout = GLOBAL_TIMEOUT , interval = 0.001 ) def wait_for_pid ( pid ) : psutil . Process ( pid ) if WINDOWS : time . sleep ( 0.01 )
wait for pid to show up in the process list then return .