Whamcloud - gitweb
Add the same module directory code that lconf uses to find the Lustre python modules.
authorrread <rread>
Wed, 2 Jul 2003 17:25:42 +0000 (17:25 +0000)
committerrread <rread>
Wed, 2 Jul 2003 17:25:42 +0000 (17:25 +0000)
lustre/utils/lactive

index e691423..a5e8580 100644 (file)
 import sys, getopt, types
 import string, os
 import ldap
+PYMOD_DIR = "/usr/lib/lustre/python"
+
+def development_mode():
+    base = os.path.dirname(sys.argv[0])
+    if os.access(base+"/Makefile.am", os.R_OK):
+        return 1
+    return 0
+
+if not development_mode():
+    sys.path.append(PYMOD_DIR)
+
 import Lustre
 
 lactive_options = [