return to first page linux journal archive
keywordscontents
#!/usr/local/bin/python
#

#
# Buggy script
#

from time import *


def PrintHeader() :
    ###########
	print "Content-type: text/html"
	print
	print "<HTML>"
	print "<Head>"
	print "<Title>Hello World</Title>"
	print "</Head>"
	print "<Body>"
	print "<H1>Hello World !</H1>"
	print "<hr>"
	print "<P>This is Belgium.
	print "<br>"
	print "Localtime is", ctime( time() ) + ".<P>"
	print "<hr>"`
	print "<H1>"


def PrintFooter() :
    ###########
	print "</H1>"
	print "</Body>"
	print "</HTML>"


def EveryDay() :
    ########
	print "Have a Nice Day !"


def NewYear() :
    #######
	print "Happy New Year !", Max


def Main() :
    ####
	PrintHeader()

	year, month, day, hour, minute, second,\
	weekday, julian, flag = localtime( time() )

	if( month == 1 and day == 1 ) :
		NewYear()
	elif( month == 9 and day == 15 ) :
		Christmas()
	else :
		EveryDay()

	PrintFooter()

Main()