This commit is contained in:
JOLIMAITRE Matthieu 2024-10-15 17:06:51 +02:00
commit a40d71d8d4
9 changed files with 344 additions and 0 deletions

13
demo/slow.py Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env -S python3
from time import sleep, time
from signal import signal, SIGINT, pause
from sys import exit
def main():
print("Now is", time())
signal(SIGINT, lambda *_: (print("Received sigint, stopping in 5s ..."), sleep(5), exit(0)))
print("Waiting for sigint.")
pause()
main()