74 |
74 |
75 @return dictionary of modules contained in the package. |
75 @return dictionary of modules contained in the package. |
76 """ |
76 """ |
77 import Utilities.ModuleParser |
77 import Utilities.ModuleParser |
78 extensions = Preferences.getPython("PythonExtensions") + \ |
78 extensions = Preferences.getPython("PythonExtensions") + \ |
79 Preferences.getPython("Python3Extensions") |
79 Preferences.getPython("Python3Extensions") |
80 moduleDict = {} |
80 moduleDict = {} |
81 modules = [] |
81 modules = [] |
82 for ext in Preferences.getPython("PythonExtensions") + \ |
82 for ext in Preferences.getPython("PythonExtensions") + \ |
83 Preferences.getPython("Python3Extensions"): |
83 Preferences.getPython("Python3Extensions"): |
84 modules.extend(glob.glob(Utilities.normjoinpath( |
84 modules.extend(glob.glob(Utilities.normjoinpath( |
85 self.packagePath, '*{0}'.format(ext)))) |
85 self.packagePath, '*{0}'.format(ext)))) |
86 |
86 |
87 tot = len(modules) |
87 tot = len(modules) |
88 try: |
88 try: |
119 if len(initlist) == 0: |
119 if len(initlist) == 0: |
120 ct = QGraphicsTextItem(None) |
120 ct = QGraphicsTextItem(None) |
121 ct.setHtml( |
121 ct.setHtml( |
122 self.trUtf8( |
122 self.trUtf8( |
123 "The directory <b>'{0}'</b> is not a Python package.") |
123 "The directory <b>'{0}'</b> is not a Python package.") |
124 .format(self.package)) |
124 .format(self.package)) |
125 self.scene.addItem(ct) |
125 self.scene.addItem(ct) |
126 return |
126 return |
127 |
127 |
128 shapes = {} |
128 shapes = {} |
129 p = 10 |
129 p = 10 |
245 """ |
245 """ |
246 from .AssociationItem import AssociationItem, Imports |
246 from .AssociationItem import AssociationItem, Imports |
247 for module in list(shapes.keys()): |
247 for module in list(shapes.keys()): |
248 for rel in shapes[module][1]: |
248 for rel in shapes[module][1]: |
249 assoc = AssociationItem( |
249 assoc = AssociationItem( |
250 shapes[module][0], shapes[rel][0], |
250 shapes[module][0], shapes[rel][0], |
251 Imports) |
251 Imports) |
252 self.scene.addItem(assoc) |
252 self.scene.addItem(assoc) |
253 |
253 |
254 def getPersistenceData(self): |
254 def getPersistenceData(self): |
255 """ |
255 """ |
256 Public method to get a string for data to be persisted. |
256 Public method to get a string for data to be persisted. |