Dec-29-2017, 08:29 AM
(This post was last modified: Dec-29-2017, 08:50 AM by cyberion1985.)
okay, so after some time adopting the above approach, I can finally reply.
This doesn't work :
It might work as
main_INIT.py (main init and core script - will run the below scripts as threads)
main_process_PDF.py
main_process_CSV.py (processes the CSV files simultaneously with threads)
So in essence :

...then I also tried
[python]
for file_name in CSVFILES:
threading.Thread(target=MAIN_CSV, args=(file_name,)).start()
threading.Thread(target=MAIN_CSV, args=(file_name,)).join()
[python/]

Quote:_=[threading.Thread(target=csv2xlsx, args=(file_name,)).start()forfile_nameinfiles_list]
It might work as
for file_name in CSVFILES: threading.Thread(target=MAIN_CSV, args=(file_name,)).start()...which I will go and test now :
main_INIT.py (main init and core script - will run the below scripts as threads)
main_process_PDF.py
main_process_CSV.py (processes the CSV files simultaneously with threads)
So in essence :
#this is main_INIT.py #do something #run function from main_process_PDF.py #run function from main_process_CSV.py #is function from main_process_PDF.py done ? is function from main_process_CSV.py done ? If both = yes, continue, else = wait . #do somethingThis doesn't work. In both cases, running it alone or inside a function, the CSV processes will not wait until all are done. They will simply run over to the next part of the script.

...then I also tried
[python]
for file_name in CSVFILES:
threading.Thread(target=MAIN_CSV, args=(file_name,)).start()
threading.Thread(target=MAIN_CSV, args=(file_name,)).join()
[python/]