File size: 429 Bytes
0d02ac5 e79a3d0 0d02ac5 ac86c25 0d02ac5 e74606e e4efafc e74606e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import time
from pathlib import Path
Path('outputs').mkdir(exist_ok=True, parents=True)
# Open the file in append mode
with open("outputs/message.txt", "a") as file:
for i in range(2):
# Append the value of i to the file
file.write(str(i) + "\n")
print(f"\t- (from {__file__}): Wrote {i}. Sleeping for 1 min")
# Wait for a minute
time.sleep(60)
print(f"\t- (from {__file__}): Done!") |