remove debugging print statement
[plcapi.git] / plcsh
diff --git a/plcsh b/plcsh
index fed505f..ad10824 100755 (executable)
--- a/plcsh
+++ b/plcsh
@@ -5,7 +5,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2005 The Trustees of Princeton University
 #
-# $Id: plcsh,v 1.5 2007/02/02 04:39:03 mlhuang Exp $
+# $Id$
 #
 
 import os
@@ -59,10 +59,15 @@ except Exception, err:
     parser.print_help()
     sys.exit(1)
 
-# If called by a script
+# If called by a script 
 if len(sys.argv) > 1 and os.path.exists(sys.argv[1]):
     # Pop us off the argument stack
     sys.argv.pop(0)
+    script = sys.argv[0]
+    
+    # Add of script to sys.path 
+    path = os.path.dirname(os.path.abspath(script))
+    sys.path.append(path)
     execfile(sys.argv[0])
 
 # Otherwise, run an interactive shell environment