Parent Directory | Revision Log
+Added a button to the Preferences tab for showing the Modules Dialog. Todo: When the module dialog is shown, it is still being blocked by the preferences dialog. I am not sure why but will have to look into it further. +Added modules directory
1 | import os |
2 | import string |
3 | |
4 | import fraggleParserXML |
5 | from fraggleEngine import * |
6 | |
7 | |
8 | def create(parent): |
9 | return FraggleCtlModules(parent) |
10 | |
11 | class FraggleCtlModules: |
12 | |
13 | def __init__(self,parent): |
14 | self.modules = self.ScanModules() |
15 | self.engine = parent |
16 | pass |
17 | |
18 | def ScanModules(self): |
19 | os.chdir('..') |
20 | self.dir = os.listdir(os.path.join(os.getcwd(),'modules')) |
21 | for i in self.dir: |
22 | self.dir[self.dir.index(i)] = string.rstrip(i,'.py') |
23 | |
24 | |
25 | |
26 | if len(self.dir) != 0: |
27 | try: |
28 | for i in self.dir: |
29 | try: |
30 | fmodules[i] = i |
31 | except NameError: |
32 | fmodules = {i:i} |
33 | print fmodules |
34 | print self.dir |
35 | |
36 | del fmodules['CVS'] |
37 | return fmodules |
38 | except ImportError: |
39 | pass |
40 | |
41 | return None |
42 | |
43 | |
44 |
MailToCvsAdmin">MailToCvsAdmin | ViewVC Help |
Powered by ViewVC 1.1.26 |