Pour compter les jours avant un certain événement. C'est super utile.. je crois
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

12345678910111213141516171819202122232425
  1. from datetime import date
  2. from config import date_dest, evenement
  3. from get_date import get_date
  4. from calcul import calcul
  5. def main():
  6. print("Twitter-DayCounter")
  7. today = date.today()
  8. dest = get_date(date_dest)
  9. temps = calcul(today, dest)
  10. if temps == 0 :
  11. print("IT'S TIME !")
  12. else :
  13. message = "Il reste " + str(temps) + " jours, avant " + evenement
  14. print(message)
  15. if __name__ == '__main__':
  16. try :
  17. main()
  18. except KeyboardInterrupt :
  19. print("Fermeture du programme...")