Mercurial > repos > pieterlukasse > nist_wrapper
comparison nist_wrapper.py @ 5:c3dc158717fc
test
author | pieter.lukasse@wur.nl |
---|---|
date | Thu, 22 Jan 2015 21:48:34 +0100 |
parents | cce6989ed423 |
children | e19a6fbcf1db |
comparison
equal
deleted
inserted
replaced
4:266b64154f57 | 5:c3dc158717fc |
---|---|
126 "/INSTRUMENT", | 126 "/INSTRUMENT", |
127 "/PAR=2"] | 127 "/PAR=2"] |
128 subprocess.call(cmd) | 128 subprocess.call(cmd) |
129 | 129 |
130 | 130 |
131 timeSleeping = 0 | |
131 # monitor process by checking state file: | 132 # monitor process by checking state file: |
132 while True: | 133 while True or timeSleeping > 20: |
133 # check if SRCREADY.TXT is there already: | 134 # check if SRCREADY.TXT is there already: |
134 if os.path.exists(file_to_monitor): | 135 if os.path.exists(file_to_monitor): |
135 break | 136 break |
136 time.sleep(2) | 137 time.sleep(2) |
138 timeSleeping =+ 2 | |
137 | 139 |
138 # kill process: | 140 # kill process: |
139 #p.terminate() - not needed, nistm$ will terminate...nistms.exe is the one that | 141 #p.terminate() - not needed, nistm$ will terminate...nistms.exe is the one that |
140 #stays open...and orphan..killing it: | 142 #stays open...and orphan..killing it: |
141 | 143 |