# The index.html file contains the style.css call:
<head>
<link rel="stylesheet" type="text/css" href="style.css" media="screen,projection" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Website</title>
</head>
# In the same directory is a style.css file
# below is the code for the http server
# Import modules needed here..all standard Python modules
from BaseHTTPServer import HTTPServer
from BaseHTTPServer import BaseHTTPRequestHandler
import string,sys,os,re
class myRequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
# Always Accept GET
self.printCustomHTTPResponse(200)
# Site root: Main Menu
if self.path == "/":
indexopen=file("index.html","r").readlines()
for line in indexopen:
self.wfile.write(line)
if self.path == "/style.css":
cssopen=file("style.css","r").readlines()
for line2 in cssopen:
self.wfile.write(line2)