Ive got some subprocesses running and stdout txt files are located in output folder. I'd like to wait for all subprocesses by looping thru all files in output folder if they'll have "exit" string which is always on the end in the process writen in the stdout txt file. Thanks for any help.
this is what i've got:
for file in glob.glob("filename*.txt"):
with open(file, "r").read() as f:
if "exit" in f:
break
but it will break when one of the files will have exit. Should While False on start be a good solution? and instead of break put continue?