#! /usr/bin/python
 
# The preceeding line (starting with the shebang) is required to
# tell Apache where to find the Python interpreter for the
# following Python script. As far as I can tell, this has to be the
# first line in the file (even before any line breaks otherwise it
# will throw a "Premature end of script headers" error.
 
# ------------------------------------------------------------ #
# ------------------------------------------------------------ #
 
 
# Define our collection of girls. With brackets, we can create
# lists in Python - these are dynamically-sized arrays.
 
girls = [ "Tricia", "Sarah", "Joanna" ];
 
 
# ------------------------------------------------------------ #
# ------------------------------------------------------------ #
 
 
# Output the mime-type in the header.
print "Content-type: text/html\n\n";
 
# Output the page content. The triple quote allow us to create
# multi-line string values.
print """
 
<html>
<head>
<title>My First Python Script Running On Mac</title>
</head>
<body>
 
<h1>
My First Python Script
</h1>
 
<p>
Check out these groovy ladies:
</p>
 
<ul>
<li>""" + girls[ 0 ] + """</li>
<li>""" + girls[ 1 ] + """</li>
<li>""" + girls[ 2 ] + """</li>
</ul>
 
</body>
</html>
 
""";
# End print
