All pastes #970125 Raw Edit

Untitled

public text v1 · immutable
·published 2008-04-03 21:07 UTC
rendered paste body
sys.path.append("%s/bin/web/" % (definepath))
class myRequestHandler(BaseHTTPRequestHandler):
 try:
  def do_GET(self):
    # Always Accept GET
    self.printCustomHTTPResponse(200)
    # Site root: Main Menu
    if self.path == "/":
       cwd=os.chdir("%s/bin/web/html/" % (definepath))
       indexopen=file("index.html","r").readlines()
       for line in indexopen:
            self.wfile.write(line)
    if self.path == "/style.css":
       cwd=os.chdir("%s/bin/web/html/" % (definepath))
       cssopen=file("style.css","r").readlines()
       for line in cssopen:
           self.wfile.write(line)