--- nfo/projects/netfraggle/bin/FraggleCtlModules.py 2004/09/01 21:43:30 1.1 +++ nfo/projects/netfraggle/bin/FraggleCtlModules.py 2004/09/05 00:21:10 1.4 @@ -1,4 +1,5 @@ import os +import string import fraggleParserXML from fraggleEngine import * @@ -10,14 +11,34 @@ class FraggleCtlModules: def __init__(self,parent): - self.ScanModules() + self.modules = self.ScanModules() self.engine = parent pass def ScanModules(self): os.chdir('..') self.dir = os.listdir(os.path.join(os.getcwd(),'modules')) - print self.dir - pass + for i in self.dir: + self.dir[self.dir.index(i)] = string.rstrip(i,'.py') + + + + if len(self.dir) != 0: + try: + for i in self.dir: + 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