git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7925296
)
append PLC to sys.path
author
Mark Huang
<mlhuang@cs.princeton.edu>
Fri, 27 Oct 2006 19:37:33 +0000
(19:37 +0000)
committer
Mark Huang
<mlhuang@cs.princeton.edu>
Fri, 27 Oct 2006 19:37:33 +0000
(19:37 +0000)
Server.py
patch
|
blob
|
history
diff --git
a/Server.py
b/Server.py
index
560bb74
..
84c3360
100755
(executable)
--- a/
Server.py
+++ b/
Server.py
@@
-5,7
+5,7
@@
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: Server.py,v 1.
2 2006/09/06 19:15:35
mlhuang Exp $
+# $Id: Server.py,v 1.
3 2006/10/25 20:33:07
mlhuang Exp $
#
import os
#
import os
@@
-14,6
+14,9
@@
import getopt
import traceback
import BaseHTTPServer
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):
from PLC.API import PLCAPI
class PLCAPIRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):