22 lines
190 KiB
Plaintext
22 lines
190 KiB
Plaintext
|
|
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")'. Poll both until finished and write their combined outputs to 'parallel_results.txt'.
|
|||
|
|
----------------------------------------
|
|||
|
|
Loading...
|
|||
|
|
|
|||
|
|
[1;34m┌─── Python Source Code ─────────────────────────────────────[0m
|
|||
|
|
[1;34m│[0m [2m 1 |[0m [34mimport[0m[33m time; time.sleep([36m5[0m[33m); print("Script A Done")[0m
|
|||
|
|
[1;34m└────────────────────────────────────────────────────────────[0m
|
|||
|
|
[1;34m┌─── Python Source Code ─────────────────────────────────────[0m
|
|||
|
|
[1;34m│[0m [2m 1 |[0m [34mimport[0m[33m time; time.sleep([36m5[0m[33m); print("Script B Done")[0m
|
|||
|
|
[1;34m└────────────────────────────────────────────────────────────[0m
|
|||
|
|
[213826] Script A Done
|
|||
|
|
[213827] Script B Done
|
|||
|
|
-> Writing file: parallel_results.txt
|
|||
|
|
|
|||
|
|
[36m [2m CHANGES: parallel_results.txt [0m
|
|||
|
|
LINE OLD
|
|||
|
|
--------------------------------------------------------------------------------------------------------------------------------------------
|
|||
|
|
1 Script A Done
|
|||
|
|
2 Script B Done
|
|||
|
|
|
|||
|
|
The two scripts have completed execution. Their combined output has been written to 'parallel_results.txt'.
|