Rather than appending a directory to the system path, this patch adds a __init__.py file to modules, which allows python to search it, and it's children for python modules. This with the import...as syntax allows for a cleaner import of python modules without changing any other parts of the catalyst file. --- catalyst | 8 ++------ modules/__init__.py | 0 2 files changed, 2 insertions(+), 6 deletions(-) create mode 100644 modules/__init__.py
diff --git a/catalyst b/catalyst index 11560fb..be1548f 100755 --- a/catalyst +++ b/catalyst @@ -11,12 +11,8 @@ import os, sys, imp, string, getopt import pdb import os.path -__selfpath__ = os.path.abspath(os.path.dirname(__file__)) - -sys.path.append(__selfpath__ + "/modules") - -import catalyst.config -import catalyst.util +import modules.catalyst.config as catalyst.config +import modules.catalyst.util as catalyst.util __maintainer__="Catalyst <[email protected]>" __version__="2.0.14" diff --git a/modules/__init__.py b/modules/__init__.py new file mode 100644 index 0000000..e69de29 -- 1.8.1.5
