1 from queue
import Queue, Empty
3 from threading
import Thread
9 dir_name =
'/zfs/store5.hydra.local/projects/user-projects/e/er/exp/exp201904/data' 10 file_pattern =
'h7_ct_0.*.lmd' 12 fileNames = [f
for f
in os.listdir(dir_name)
if os.path.isfile(os.path.join(dir_name, f))
and re.match(file_pattern, f)]
14 for fileName
in fileNames:
20 fileName = q.get_nowait()
23 proc = subprocess.Popen([
'./run.sh', fileName])
26 threads = [Thread(target=worker)
for _
in range(threads_count) ]
27 for thread
in threads:
29 for thread
in threads: