Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-release > by-pkgid > 0d4b03f6c024599542f359647823b03c > files > 12

python-egenix-mx-base-doc-3.2.9-2.mga6.noarch.rpm

#!/usr/bin/python -u
""" Y2000.py - The year 2000 countdown.
"""
from mx.DateTime import *
from time import sleep
import sys

while 1:
    d = Date(2000,1,1) - now()
    if d.days < 0:
        print 'Y2000... made it !'
        break
    print 'Y2000... time left: %2i days %2i hours %2i minutes %2i seconds\r'%\
          (d.day,d.hour,d.minute,d.second),
    sys.stdout.flush()
    sleep(1)