From 75340bfedff45f70018900a56b68d3ec6ccd30c3 Mon Sep 17 00:00:00 2001 From: Stan Seibert Date: Wed, 21 Dec 2011 11:21:50 -0500 Subject: Temporarily include the current directory in the module path when loading detector geometries. --- bin/chroma-cam | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/chroma-cam b/bin/chroma-cam index 25f0eb3..c75f28f 100755 --- a/bin/chroma-cam +++ b/bin/chroma-cam @@ -32,10 +32,13 @@ if __name__ == '__main__': obj = mesh_from_stl(args[0]) else: module_name, function_name = args[0].rsplit('.', 1) - + orig_sys_path = list(sys.path) try: + sys.path.append('.') module = __import__(module_name, fromlist=[function_name]) + sys.path = orig_sys_path except ImportError: + sys.path = orig_sys_path raise obj = getattr(module, function_name) -- cgit