File: Y2000.py

package info (click to toggle)
egenix-mx-base 3.2.1-1.1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 8,496 kB
  • sloc: ansic: 21,976; python: 17,192; sh: 137; makefile: 116
file content (16 lines) | stat: -rw-r--r-- 399 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/local/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)