76 package. |
76 package. |
77 |
77 |
78 @return dictionary of modules contained in the package. |
78 @return dictionary of modules contained in the package. |
79 """ |
79 """ |
80 import Utilities.ModuleParser |
80 import Utilities.ModuleParser |
81 extensions = Preferences.getPython("PythonExtensions") + \ |
81 extensions = ( |
|
82 Preferences.getPython("PythonExtensions") + |
82 Preferences.getPython("Python3Extensions") |
83 Preferences.getPython("Python3Extensions") |
|
84 ) |
83 moduleDict = {} |
85 moduleDict = {} |
84 modules = [] |
86 modules = [] |
85 for ext in Preferences.getPython("PythonExtensions") + \ |
87 for ext in ( |
86 Preferences.getPython("Python3Extensions"): |
88 Preferences.getPython("PythonExtensions") + |
|
89 Preferences.getPython("Python3Extensions") |
|
90 ): |
87 modules.extend(glob.glob(Utilities.normjoinpath( |
91 modules.extend(glob.glob(Utilities.normjoinpath( |
88 self.packagePath, '*{0}'.format(ext)))) |
92 self.packagePath, '*{0}'.format(ext)))) |
89 |
93 |
90 tot = len(modules) |
94 tot = len(modules) |
91 progress = E5ProgressDialog( |
95 progress = E5ProgressDialog( |
271 @param version version of the data (string) |
275 @param version version of the data (string) |
272 @param data persisted data to be parsed (string) |
276 @param data persisted data to be parsed (string) |
273 @return flag indicating success (boolean) |
277 @return flag indicating success (boolean) |
274 """ |
278 """ |
275 parts = data.split(", ") |
279 parts = data.split(", ") |
276 if len(parts) != 2 or \ |
280 if ( |
277 not parts[0].startswith("package=") or \ |
281 len(parts) != 2 or |
278 not parts[1].startswith("show_external="): |
282 not parts[0].startswith("package=") or |
|
283 not parts[1].startswith("show_external=") |
|
284 ): |
279 return False |
285 return False |
280 |
286 |
281 self.packagePath = parts[0].split("=", 1)[1].strip() |
287 self.packagePath = parts[0].split("=", 1)[1].strip() |
282 self.showExternalImports = Utilities.toBool( |
288 self.showExternalImports = Utilities.toBool( |
283 parts[1].split("=", 1)[1].strip()) |
289 parts[1].split("=", 1)[1].strip()) |