282 @param path path the file should be searched in (list of strings) |
282 @param path path the file should be searched in (list of strings) |
283 @return the resulting dictionary |
283 @return the resulting dictionary |
284 """ |
284 """ |
285 global _modules |
285 global _modules |
286 |
286 |
287 dict = {} |
287 dictionary = {} |
288 |
288 |
289 if module in _modules: |
289 if module in _modules: |
290 # we've seen this file before... |
290 # we've seen this file before... |
291 return _modules[module] |
291 return _modules[module] |
292 |
292 |
296 f, file, (suff, mode, type) = ClassBrowsers.find_module(module, fullpath) |
296 f, file, (suff, mode, type) = ClassBrowsers.find_module(module, fullpath) |
297 if f: |
297 if f: |
298 f.close() |
298 f.close() |
299 if type not in SUPPORTED_TYPES: |
299 if type not in SUPPORTED_TYPES: |
300 # not CORBA IDL source, can't do anything with this module |
300 # not CORBA IDL source, can't do anything with this module |
301 _modules[module] = dict |
301 _modules[module] = dictionary |
302 return dict |
302 return dictionary |
303 |
303 |
304 _modules[module] = dict |
304 _modules[module] = dictionary |
305 try: |
305 try: |
306 src = Utilities.readEncodedFile(file)[0] |
306 src = Utilities.readEncodedFile(file)[0] |
307 except (UnicodeError, IOError): |
307 except (UnicodeError, IOError): |
308 # can't do anything with this module |
308 # can't do anything with this module |
309 _modules[module] = dict |
309 _modules[module] = dictionary |
310 return dict |
310 return dictionary |
311 |
311 |
312 visitor = Visitor(src, module, file) |
312 visitor = Visitor(src, module, file) |
313 dict = visitor.parse() |
313 dictionary = visitor.parse() |
314 _modules[module] = dict |
314 _modules[module] = dictionary |
315 return dict |
315 return dictionary |