24 lines
316 KiB
Plaintext
Raw Normal View History

TASK: Run two different Python scripts asynchronously at the same time. Script A: 'import time; time.sleep(5); print("Script A Done")'. Script B: 'import time; time.sleep(5); print("Script B Done")'. You MUST poll both until they are finished using process_get_status, then write their combined final outputs to 'parallel_results.txt'.
----------------------------------------
Loading...
┌─── Python Source Code ─────────────────────────────────────
│  1 | import time; time.sleep(5); print("Script A Done")
└────────────────────────────────────────────────────────────
┌─── Python Source Code ─────────────────────────────────────
│  1 | import time; time.sleep(5); print("Script B Done")
└────────────────────────────────────────────────────────────
[93520] Script A Done
[93522] Script B Done
-> Writing file: parallel_results.txt
  CHANGES: parallel_results.txt 
LINE OLD
--------------------------------------------------------------------------------------------------------------------------------------------
1 - Script A Output: Script A Done
2 - Script B Output: Script B Done
The two scripts have completed execution. The combined output has been saved to 'parallel_results.txt'.