103 if name.startswith(self.package): |
103 if name.startswith(self.package): |
104 name = name[len(self.package) + 1:] |
104 name = name[len(self.package) + 1:] |
105 moduleDict[name] = mod |
105 moduleDict[name] = mod |
106 finally: |
106 finally: |
107 progress.setValue(tot) |
107 progress.setValue(tot) |
|
108 progress.deleteLater() |
108 return moduleDict |
109 return moduleDict |
109 |
110 |
110 def __buildSubpackagesDict(self): |
111 def __buildSubpackagesDict(self): |
111 """ |
112 """ |
112 Private method to build a dictionary of sub-packages contained in this package. |
113 Private method to build a dictionary of sub-packages contained in this package. |
124 subpackagesList = [] |
125 subpackagesList = [] |
125 |
126 |
126 for subpackage in os.listdir(self.package): |
127 for subpackage in os.listdir(self.package): |
127 subpackagePath = os.path.join(self.package, subpackage) |
128 subpackagePath = os.path.join(self.package, subpackage) |
128 if os.path.isdir(subpackagePath) and \ |
129 if os.path.isdir(subpackagePath) and \ |
|
130 subpackage != "__pycache__" and \ |
129 len(glob.glob(os.path.join(subpackagePath, "__init__.*"))) != 0: |
131 len(glob.glob(os.path.join(subpackagePath, "__init__.*"))) != 0: |
130 subpackagesList.append(subpackagePath) |
132 subpackagesList.append(subpackagePath) |
131 |
133 |
132 tot = 0 |
134 tot = 0 |
133 for ext in supportedExt: |
135 for ext in supportedExt: |
164 if "__init__" in subpackagesDict[packageName]: |
166 if "__init__" in subpackagesDict[packageName]: |
165 subpackagesDict[packageName].remove("__init__") |
167 subpackagesDict[packageName].remove("__init__") |
166 subpackagesDict[packageName].insert(0, "__init__") |
168 subpackagesDict[packageName].insert(0, "__init__") |
167 finally: |
169 finally: |
168 progress.setValue(tot) |
170 progress.setValue(tot) |
|
171 progress.deleteLater() |
169 return subpackagesDict |
172 return subpackagesDict |
170 |
173 |
171 def buildDiagram(self): |
174 def buildDiagram(self): |
172 """ |
175 """ |
173 Public method to build the class shapes of the package diagram. |
176 Public method to build the class shapes of the package diagram. |