--- nfo/projects/netfraggle/bin/FraggleCtlModules.py 2004/09/01 22:29:47 1.2 +++ nfo/projects/netfraggle/bin/FraggleCtlModules.py 2004/09/04 20:26:01 1.3 @@ -11,7 +11,7 @@ class FraggleCtlModules: def __init__(self,parent): - self.ScanModules() + self.modules = self.ScanModules() self.engine = parent pass @@ -19,17 +19,26 @@ os.chdir('..') self.dir = os.listdir(os.path.join(os.getcwd(),'modules')) for i in self.dir: - self.dir[self.dir.index(i)] = string.rstrip(i,'.py') + self.dir[self.dir.index(i)] = string.rstrip(i,'.py') + if len(self.dir) != 0: try: for i in self.dir: - self.modules = {i:__import__(i)} - print self.modules + try: + fmodules[i] = i + except NameError: + fmodules = {i:i} + print fmodules print self.dir + + del fmodules['CVS'] + return fmodules except ImportError: pass + return None + \ No newline at end of file