From ac8e0df051de43cf8822d006b55f02aae5f35750 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 19 Jul 2013 10:31:02 -0400 Subject: [PATCH] Arrange things so that the startup py is in bin --- bin/confluent-server.py | 8 ++++++++ confluent/main.py | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 bin/confluent-server.py diff --git a/bin/confluent-server.py b/bin/confluent-server.py new file mode 100644 index 00000000..9c738530 --- /dev/null +++ b/bin/confluent-server.py @@ -0,0 +1,8 @@ +import sys +import os +path = os.path.dirname(os.path.realpath(__file__)) +path = os.path.realpath(os.path.join(path, '..')) +sys.path.append(path) +from confluent import main + +main.run() diff --git a/confluent/main.py b/confluent/main.py index 05b3c381..c2a8b439 100644 --- a/confluent/main.py +++ b/confluent/main.py @@ -18,6 +18,7 @@ import multiprocessing import sys import os +pluginmap = {} def _load_plugins(): # To know our plugins directory, we get the parent path of 'bin' path=os.path.dirname(os.path.realpath(__file__)) @@ -28,5 +29,9 @@ def _load_plugins(): for plugin in os.listdir(plugindir): plugin = os.path.splitext(plugin)[0] plugins.add(plugin) + for plugin in plugins: + tmpmod = __import__(plugin) + -if __name__ == "__main__": +def run(): + _load_plugins()