23
loading...
This website collects cookies to deliver better user experience
pip install plyer
or pip3 install plyer
.import time
from plyer import notification
import time
from plyer import notification
count = 0
print("The pomodoro timer has started, start working!")
while True:
loop nested inside an if __name__ == "__main__":
statement ( if you're not familiar with it, here's a good explanation: https://stackoverflow.com/questions/419163/what-does-if-name-main-do ):if __name__ == "__main__":
while True:
if __name__ == "__main__":
while True:
notification.notify(
title = "Good work!",
message = "Take a 10 minute break! You have completed " + str(count) + " pomodoros so far",
)
)
if __name__ == "__main__":
while True:
notification.notify(
title = "Good work!",
message = "Take a 10 minute break! You have completed " + str(count) + " pomodoros so far",
)
notification.notify(
title = "Back to work!",
message = "Try doing another pomodoro...",
)
)
if __name__ == "__main__":
while True:
time.sleep(1800)
count += 1
notification.notify(
title = "Good work!",
message = "Take a 10 minute break! You have completed " + str(count) + " pomodoros so far",
)
time.sleep(600)
notification.notify(
title = "Back to work!",
message = "Try doing another pomodoro...",
)
import time
from plyer import notification
count = 0
print("The pomodoro timer has started, start working!")
if __name__ == "__main__":
while True:
time.sleep(1800)
count += 1
notification.notify(
title = "Good work!",
message = "Take a 10 minute break! You have completed " + str(count) + " pomodoros so far",
)
time.sleep(600)
notification.notify(
title = "Back to work!",
message = "Try doing another pomodoro...",
)