# Copyright (C) 2006 The Trustees of Princeton University
#
# $Id$
+# $URL$
#
import os
import traceback
import BaseHTTPServer
+# Append PLC to the system path
+sys.path.append(os.path.dirname(os.path.realpath(sys.argv[0])))
+
from PLC.API import PLCAPI
class PLCAPIRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
# Write response
self.send_response(200)
+ self.send_header("Content-type", "text/xml")
+ self.send_header("Content-length", str(len(response)))
+ self.end_headers()
self.wfile.write(response)
- self.wfile.flush()
+ self.wfile.flush()
self.connection.shutdown(1)
except Exception, e:
# Defaults
addr = "0.0.0.0"
port = 8000
-config = "/etc/planetlab/plc_config.xml"
+config = "/etc/planetlab/plc_config"
def usage():
print "Usage: %s [OPTION]..." % sys.argv[0]