From: Marien Zwart Date: Wed, 5 Apr 2006 15:41:21 +0000 (+0200) Subject: Determine plugin_path from the location of the plugin module, not from argv[0]. X-Git-Tag: 1.0.0~198^2~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=47f552ea663ccf37097051ed7c42ffaa754704dc;p=be.git Determine plugin_path from the location of the plugin module, not from argv[0]. --- diff --git a/libbe/plugin.py b/libbe/plugin.py index b175733..4016ca1 100644 --- a/libbe/plugin.py +++ b/libbe/plugin.py @@ -52,9 +52,7 @@ def get_plugin(prefix, name): return my_import(prefix + "." + name) return None -plugin_path = sys.path[0] -while not os.path.isfile(os.path.join(plugin_path, "libbe/plugin.py")): - plugin_path = os.path.realpath(os.path.dirname(plugin_path)) +plugin_path = os.path.realpath(os.path.dirname(os.path.dirname(__file__))) if plugin_path not in sys.path: sys.path.append(plugin_path) def _test():